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