Index: branches/RC/core/units/fck/fck_eh.php =================================================================== diff -u -N -r11520 -r11568 --- branches/RC/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 11520) +++ branches/RC/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 11568) @@ -58,36 +58,29 @@ $this->CreateXmlHeader(); $res = ''."\n" ; $res.= ""."\n"; - if ($this->Application->isModuleEnabled('Proj-CMS')) { - $lang = $this->Application->GetVar('m_lang'); - $st =& $this->Application->recallObject('st.-dummy'); - $st_options = $this->Application->getUnitOption('st'.'.ParentId', 'Fields'); - $pages = $st_options['options']; - $page_ids = array_keys($pages); - $tpls = $this->Application->Conn->GetCol('SELECT NamedParentPath, CategoryId FROM '.TABLE_PREFIX.'Category WHERE CategoryId IN ('.join(',', $page_ids).')', 'CategoryId'); - //$res = ''; - foreach ($pages as $id => $title) { - $page_path = preg_replace('/^Content\//i', '', strtolower($tpls[$id]).'.html'); - $title = $title.' ('.$page_path.')'; - $real_url = $this->Application->HREF($tpls[$id], '_FRONT_END_', array('pass'=>'m'), 'index.php'); - $res .= ''."\n"; - } - } - else { + $lang = $this->Application->GetVar('m_lang'); - $lang = $this->Application->GetVar('m_lang'); + $st =& $this->Application->recallObject('st.-dummy'); + /* @var $st kDBItem */ - $query = 'SELECT PageId, Path, l'.$lang.'_Title AS Title FROM '.TABLE_PREFIX.'Pages ORDER By l'.$lang.'_Title'; - $pages = $this->Application->Conn->Query($query); + $st_options = $this->Application->getUnitOption('st'.'.ParentId', 'Fields'); + $pages = $st_options['options']; + $page_ids = array_keys($pages); -// $res = ''; - foreach ($pages as $page) { - $page_path = $page['Path'].'.html'; - $title = $page['Title'].' ('.$page_path.')'; - $res .= ''; - } + $sql = 'SELECT NamedParentPath, CategoryId + FROM ' . TABLE_PREFIX . 'Category + WHERE CategoryId IN (' . implode(',', $page_ids) . ')'; + $tpls = $this->Application->Conn->GetCol($sql, 'CategoryId'); + + //$res = ''; + foreach ($pages as $id => $title) { + $page_path = preg_replace('/^Content\//i', '', strtolower($tpls[$id]).'.html'); + $title = $title.' ('.$page_path.')'; + $real_url = $this->Application->HREF($tpls[$id], '_FRONT_END_', array('pass'=>'m'), 'index.php'); + $res .= ''."\n"; } + $res.= ""; echo $res; }