Index: branches/5.3.x/core/units/helpers/mod_rewrite_helper.php =================================================================== diff -u -N -r15483 -r15698 --- branches/5.3.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 15483) +++ branches/5.3.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 15698) @@ -1,6 +1,6 @@ Conn->nextQueryCachable = true; + $config = $this->Application->getUnitConfig($prefix); + $sql = 'SELECT ResourceId - FROM ' . $this->Application->getUnitOption($prefix, 'TableName') . ' - WHERE ' . $this->Application->getUnitOption($prefix, 'IDField') . ' = ' . $this->Conn->qstr($id); + FROM ' . $config->getTableName() . ' + WHERE ' . $config->getIDField() . ' = ' . $this->Conn->qstr($id); $resource_id = $this->Conn->GetOne($sql); $this->Conn->nextQueryCachable = true; @@ -275,10 +277,10 @@ $item_template = $rewrite_processor->GetItemTemplate($cat_item, $module_prefix, $vars['m_theme']); // converting ResourceId to corresponding Item id - $module_config = $this->Application->getUnitOptions($module_prefix); + $module_config = $this->Application->getUnitConfig($module_prefix); - $sql = 'SELECT ' . $module_config['IDField'] . ' - FROM ' . $module_config['TableName'] . ' + $sql = 'SELECT ' . $module_config->getIDField() . ' + FROM ' . $module_config->getTableName() . ' WHERE ResourceId = ' . $cat_item['ItemResourceId']; $item_id = $this->Conn->GetOne($sql);