Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php =================================================================== diff -u -r1426 -r1481 --- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 1426) +++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/commands.php (.../commands.php) (revision 1481) @@ -94,28 +94,37 @@ if ( $cms_mode == 1 ) { $query = " - SELECT - st.st_path AS page_title, - st.* - FROM - structure_templates AS st - WHERE - st.st_parent_id = ".$st_id." - AND - st_id != ".$email_templates_folder_id." - AND - st_path != '/cms'"; + SELECT st.*, + IF(lb.eng_content='' OR lb.eng_content IS NULL, + st.st_path, + lb.eng_content + ) AS page_title + FROM + structure_templates AS st + LEFT JOIN + live_blocks AS lb + ON + (st.st_id = lb.template_id) AND (lb.block_type = 3) + WHERE + st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms' + ORDER BY st.st_order"; } else { - $query = "SELECT st.*, wb.eng_content AS page_title - FROM + $query = " + SELECT st.*, + IF(wb.eng_content='' OR wb.eng_content IS NULL, + st.st_path, + wb.eng_content + ) AS page_title + FROM structure_templates AS st - LEFT JOIN + LEFT JOIN working_blocks AS wb - ON + ON (st.st_id = wb.template_id) AND (wb.block_type = 3) - WHERE - st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms'"; + WHERE + st.st_parent_id = ".$st_id." AND st_id != ".$email_templates_folder_id." AND st_path != '/cms%' + ORDER BY st.st_order"; } //echo $query."
"; @@ -134,7 +143,7 @@ if ($level > 0) $prefix=$prefix.'- '; - $res .= ''; + $res .= ''; $res .= ReadCmsTree($rs->fields['st_id'], $level+1); $rs->MoveNext();