Index: branches/5.0.x/core/units/helpers/mod_rewrite_helper.php =================================================================== diff -u -r12357 -r12511 --- branches/5.0.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 12357) +++ branches/5.0.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 12511) @@ -1,6 +1,6 @@ Conn->qstr($item_filename) . ')'; + WHERE (ci.CategoryId = ' . (int)$vars['m_cat_id'] . ') AND (ci.Filename = ' . $this->Conn->qstr($item_filename) . ')'; $cat_item = $this->Conn->GetRow($sql); if ($cat_item !== false) { @@ -764,7 +764,7 @@ { $sql = 'SELECT c.ParentPath, c.CategoryId FROM ' . TABLE_PREFIX . 'Category AS c - WHERE c.CategoryId = ' . $vars['m_cat_id']; + WHERE c.CategoryId = ' . (int)$vars['m_cat_id']; $cat_item = $this->Conn->GetRow($sql); $item_template = $this->GetItemTemplate($cat_item, 'bb');