Index: branches/5.2.x/core/units/fck/fck_eh.php =================================================================== diff -u -N -r16513 -r16681 --- branches/5.2.x/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 16513) +++ branches/5.2.x/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 16681) @@ -1,6 +1,6 @@ getStructureTreeAsOptions(); - $sql = 'SELECT NamedParentPath, CategoryId + $sql = 'SELECT LOWER(NamedParentPath), CategoryId FROM ' . TABLE_PREFIX . 'Categories WHERE CategoryId IN (' . implode(',', array_keys($pages)) . ')'; $templates = $this->Conn->GetCol($sql, 'CategoryId'); - $templates[$this->Application->getBaseCategory()] .= '/Index'; // "Content" category will act as "Home Page" + // "Content" category will act as "Home Page". + $templates[$this->Application->getBaseCategory()] .= '/'; $res = '' . "\n"; $res .= '' . "\n"; - foreach ($pages as $id => $title) { + $url_params = array('pass' => 'm'); + + if ( $this->Application->ConfigValue('UseModRewrite') ) { + $url_params['__MOD_REWRITE__'] = 1; + } + + $base_url = rtrim($this->Application->BaseURL(), '/'); + + foreach ( $pages as $id => $title ) { $template = $templates[$id]; - $page_path = preg_replace('/^Content\//i', '', strtolower($template).'.html'); + $real_url = $this->Application->HREF($template, '_FRONT_END_', $url_params, 'index.php'); + $page_path = str_replace($base_url, '', $real_url); $title = $title . ' (' . $page_path . ')'; - $real_url = $this->Application->HREF($template, '_FRONT_END_', array('pass' => 'm'), 'index.php'); - $res .= '' . "\n"; + $res .= sprintf( + '' . "\n", + kUtil::escape($real_url, kUtil::ESCAPE_HTML), + $id, + kUtil::escape($title, kUtil::ESCAPE_HTML) + ); } - $res.= ""; + $res .= ''; $this->CreateXmlHeader(); echo $res;