Index: branches/unlabeled/unlabeled-1.44.2/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php
===================================================================
diff -u -r6801 -r7466
--- branches/unlabeled/unlabeled-1.44.2/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 6801)
+++ branches/unlabeled/unlabeled-1.44.2/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 7466)
@@ -111,18 +111,34 @@
$application =& kApplication::Instance();
$application->Init();
- $lang = $application->GetVar('m_lang');
+ if ($application->isModuleEnabled('Proj-CMS')) {
+ $lang = $application->GetVar('m_lang');
- $query = 'SELECT PageId, Path, l'.$lang.'_Title AS Title FROM '.TABLE_PREFIX.'Pages ORDER By l'.$lang.'_Title';
- $pages = $application->Conn->Query($query);
+ $query = 'SELECT CategoryId, NamedParentPath, l'.$lang.'_Title AS Title FROM '.TABLE_PREFIX.'Category ORDER By l'.$lang.'_Title';
+ $pages = $application->Conn->Query($query);
- $res = '';
- foreach ($pages as $page) {
- $page_path = $page['Path'].'.html';
- $title = $page['Title'].' ('.$page_path.')';
- $res .= '';
+ $res = '';
+ foreach ($pages as $page) {
+ $page_path = preg_replace('/^content\//', '', strtolower($page['NamedParentPath']).'.html');
+ $title = $page['Title'].' ('.$page_path.')';
+ $res .= '';
+ }
}
+ else {
+ $lang = $application->GetVar('m_lang');
+
+ $query = 'SELECT PageId, Path, l'.$lang.'_Title AS Title FROM '.TABLE_PREFIX.'Pages ORDER By l'.$lang.'_Title';
+ $pages = $application->Conn->Query($query);
+
+ $res = '';
+ foreach ($pages as $page) {
+ $page_path = $page['Path'].'.html';
+ $title = $page['Title'].' ('.$page_path.')';
+ $res .= '';
+ }
+ }
+
return $res;
}
function ReadCmsTree($st_id, $level = 0)