Index: branches/5.0.x/core/units/helpers/modules_helper.php =================================================================== diff -u -r12321 -r12357 --- branches/5.0.x/core/units/helpers/modules_helper.php (.../modules_helper.php) (revision 12321) +++ branches/5.0.x/core/units/helpers/modules_helper.php (.../modules_helper.php) (revision 12357) @@ -1,6 +1,6 @@ Application->IsAdmin()) return implode(' AND ', $where_clause); + if (!$this->Application->IsAdmin()) { + return implode(' AND ', $where_clause); + } $modules = $this->_GetModules(); if ($modules) { Index: branches/5.0.x/core/units/form_submissions/form_submissions_eh.php =================================================================== diff -u -r12299 -r12357 --- branches/5.0.x/core/units/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 12299) +++ branches/5.0.x/core/units/form_submissions/form_submissions_eh.php (.../form_submissions_eh.php) (revision 12357) @@ -1,6 +1,6 @@ addFilter('form_filter','%1$s.FormId = '.$form_id); } - function GetPassedId(&$event) + function getPassedID(&$event) { if (!$this->Application->IsAdmin()) { return 0; Index: branches/5.0.x/core/units/themes/themes_eh.php =================================================================== diff -u -r12299 -r12357 --- branches/5.0.x/core/units/themes/themes_eh.php (.../themes_eh.php) (revision 12299) +++ branches/5.0.x/core/units/themes/themes_eh.php (.../themes_eh.php) (revision 12357) @@ -1,6 +1,6 @@ Application->SetVar('m_cat_id', 0); if (MOD_REWRITE) { - foreach ($this->Application->ModuleInfo as $module_name => $module_data) { - $this->Application->DeleteVar($module_data['Var'].'_Page'); - } + $mod_rewrite_helper =& $this->Application->recallObject('ModRewriteHelper'); + /* @var $mod_rewrite_helper kModRewriteHelper */ + + $mod_rewrite_helper->removePages(); } $this->Application->SetVar('m_theme', $this->Application->GetVar('theme')); Index: branches/5.0.x/core/units/languages/languages_event_handler.php =================================================================== diff -u -r12299 -r12357 --- branches/5.0.x/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 12299) +++ branches/5.0.x/core/units/languages/languages_event_handler.php (.../languages_event_handler.php) (revision 12357) @@ -1,6 +1,6 @@ Application->SetVar('skip_last_template', 1); } + elseif (MOD_REWRITE) { + $mod_rewrite_helper =& $this->Application->recallObject('ModRewriteHelper'); + /* @var $mod_rewrite_helper kModRewriteHelper */ + $mod_rewrite_helper->removePages(); + } + //$this->Application->LinkVar('language', 'm_lang'); } Index: branches/5.0.x/core/units/helpers/mod_rewrite_helper.php =================================================================== diff -u -r12306 -r12357 --- branches/5.0.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 12306) +++ branches/5.0.x/core/units/helpers/mod_rewrite_helper.php (.../mod_rewrite_helper.php) (revision 12357) @@ -1,6 +1,6 @@ _modulePrefix === false) && in_array('parseCategory', $this->_partsFound)) { // no item found, but category found -> module index page - foreach ($this->Application->ModuleInfo as $module_name => $info) { + foreach ($this->Application->RewriteListeners as $prefix => $listener) { // no idea what module we are talking about, so pass info form all modules - $vars['pass'][] = $info['Var']; + $vars['pass'][] = $prefix; } return $vars; @@ -330,7 +330,9 @@ } // inject custom url parts made by other rewrite listeners just after language/theme url parts - $ret .= implode('/', $params['inject_parts']) . '/'; + if ($params['inject_parts']) { + $ret .= implode('/', $params['inject_parts']) . '/'; + } // add category if ($processed_params['m_cat_id'] > 0 && $params['pass_category']) { @@ -494,6 +496,8 @@ * @param Array $url_parts * @param Array $vars * @return string + * + * @todo Should find a way, how to determine what rewrite listerner page is it */ function _parsePage(&$url_parts, &$vars) { @@ -518,6 +522,18 @@ } /** + * Remove page numbers for all rewrite listeners + * + * @todo Should find a way, how to determine what rewrite listerner page is it + */ + function removePages() + { + foreach ($this->Application->RewriteListeners as $prefix => $listener) { + $this->Application->DeleteVar($prefix . '_Page'); + } + } + + /** * Extracts category part from url * * @param Array $url_parts