Index: branches/5.2.x/core/kernel/managers/rewrite_url_processor.php =================================================================== diff -u -N -r14841 -r15012 --- branches/5.2.x/core/kernel/managers/rewrite_url_processor.php (.../rewrite_url_processor.php) (revision 14841) +++ branches/5.2.x/core/kernel/managers/rewrite_url_processor.php (.../rewrite_url_processor.php) (revision 15012) @@ -230,7 +230,7 @@ // get expiration if ($vars['m_cat_id'] > 0) { $sql = 'SELECT PageExpiration - FROM ' . TABLE_PREFIX . 'Category + FROM ' . TABLE_PREFIX . 'Categories WHERE CategoryId = ' . $vars['m_cat_id']; $expiration = $this->Conn->GetOne($sql); } @@ -492,7 +492,7 @@ $url_part = reset($url_parts); $sql = 'SELECT LanguageId, IF(LOWER(PackName) = ' . $this->Conn->qstr($url_part) . ', 2, PrimaryLang) AS SortKey - FROM ' . TABLE_PREFIX . 'Language + FROM ' . TABLE_PREFIX . 'Languages WHERE Enabled = 1 ORDER BY SortKey DESC'; $language_info = $this->Conn->GetRow($sql); @@ -534,7 +534,7 @@ $url_part = reset($url_parts); $sql = 'SELECT ThemeId, IF(LOWER(Name) = ' . $this->Conn->qstr($url_part) . ', 2, PrimaryTheme) AS SortKey, TemplateAliases - FROM ' . TABLE_PREFIX . 'Theme + FROM ' . TABLE_PREFIX . 'Themes WHERE Enabled = 1 ORDER BY SortKey DESC'; $theme_info = $this->Conn->GetRow($sql); @@ -694,7 +694,7 @@ $category = $this->Application->findModule('Var', $module_prefix, 'RootCat'); } $sql = 'SELECT c.ParentPath, c.CategoryId - FROM ' . TABLE_PREFIX . 'Category AS c + FROM ' . TABLE_PREFIX . 'Categories AS c WHERE c.CategoryId = ' . $category; $category = $this->Conn->GetRow($sql); } @@ -708,7 +708,7 @@ $query = ' SELECT ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . ', FIND_IN_SET(c.CategoryId, ' . $this->Conn->qstr($parent_path) . ') AS Ord1, c.CategoryId, c.Name, ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . ' - FROM ' . TABLE_PREFIX . 'Category AS c + FROM ' . TABLE_PREFIX . 'Categories AS c LEFT JOIN ' . TABLE_PREFIX . 'CategoryCustomData AS ccd ON ccd.ResourceId = c.ResourceId WHERE c.CategoryId IN (' . $parent_path . ') AND ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . ' != \'\' @@ -722,7 +722,7 @@ /* @var $themes_helper kThemesHelper */ $sql = 'SELECT TemplateAliases - FROM ' . TABLE_PREFIX . 'Theme + FROM ' . TABLE_PREFIX . 'Themes WHERE ThemeId = ' . (int)$themes_helper->getCurrentThemeId(); $template_aliases = $this->Conn->GetOne($sql); @@ -757,7 +757,7 @@ } $sql = 'SELECT CustomFieldId - FROM ' . TABLE_PREFIX . 'CustomField + FROM ' . TABLE_PREFIX . 'CustomFields WHERE FieldName = ' . $this->Conn->qstr($module_prefix . '_ItemTemplate'); $item_template_field_id = $this->Conn->GetOne($sql);