Index: branches/5.0.x/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r12497 -r12511 --- branches/5.0.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 12497) +++ branches/5.0.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 12511) @@ -1,6 +1,6 @@ Application->recallObject($this->getPrefixSpecial(), $this->Prefix.'_List'); $sql = 'SELECT '.$this->getTitleField().' FROM '.$cat_object->TableName.' - WHERE CategoryId = '.$this->Application->GetVar('m_cat_id'); + WHERE CategoryId = '.(int)$this->Application->GetVar('m_cat_id'); return $this->Conn->GetOne($sql); } @@ -696,7 +696,7 @@ if (!isset($current_path)) { $sql = 'SELECT ParentPath FROM ' . TABLE_PREFIX . 'Category - WHERE CategoryId = ' . $this->Application->GetVar('m_cat_id'); + WHERE CategoryId = ' . (int)$this->Application->GetVar('m_cat_id'); $current_path = $this->Conn->GetOne($sql); } @@ -1056,7 +1056,12 @@ } else { // no relation with current category object -> query from db - $sql = 'SELECT l' . $this->Application->GetVar('m_lang') . '_CachedNavbar + $language_id = (int)$this->Application->GetVar('m_lang'); + if (!$language_id) { + $language_id = 1; + } + + $sql = 'SELECT l' . $language_id . '_CachedNavbar FROM ' . $object->TableName . ' WHERE ' . $object->IDField . ' = ' . $category_id; $cached_navbar = $this->Conn->GetOne($sql); @@ -2022,8 +2027,12 @@ $id_field = $this->Application->getUnitOption($this->Prefix, 'IDField'); $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName'); - $language = $this->Application->GetVar('m_lang'); + $language = (int)$this->Application->GetVar('m_lang'); + if (!$language) { + $language = 1; + } + $sql = 'SELECT l'.$language.'_Name AS Name, NamedParentPath FROM '.$table_name.' WHERE '.$id_field.' IN ('.implode(',', $category_ids).')';