fixed theme layout list

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9413 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2011-09-28 11:12:10 +00:00
parent 775234cb23
commit 55767be44a
2 changed files with 12 additions and 4 deletions

View file

@ -273,6 +273,8 @@
if (!$GLOBALS['__ThemeModuleSkin__'][$module_name]){
$GLOBALS['__ThemeModuleSkin__'][$module_name] = array();
$GLOBALS['__ThemeModuleSkin__'][$module_name]['skins'] = array();
$moduleInfo = $oModuleModel->getModuleInfoXml($module_name);
$GLOBALS['__ThemeModuleSkin__'][$module_name]['title'] = $moduleInfo->title;
}
$GLOBALS['__ThemeModuleSkin__'][$module_name]['skins'][$skin_info->name] = $oModuleModel->loadSkinInfo($skin_info->path, '', '');
}

View file

@ -21,12 +21,18 @@
// Set a layout list
$oLayoutModel = &getModel('layout');
$layout_list = $oLayoutModel->getDownloadedLayoutList('P', true);
// get Theme layout
$oAdminModel = &getAdminModel('admin');
$themeList = $oAdminModel->getThemeList();
$themeLayoutList = array();
foreach($themeList as $themeInfo){
if(strpos($themeInfo->layout_info->name, '.') === false) continue;
$themeLayoutList[] = $oLayoutModel->getLayoutInfo($themeInfo->layout_info->name, null, 'P');
}
$layout_list = array_merge($layout_list, $themeLayoutList);
$layout_list[] = $oLayoutModel->getLayoutInfo('faceoff', null, 'P');
Context::set('type', 'P');
//Security
$security = new Security();
$security->encodeHTML('layout_list..layout','layout_list..title');
$pcLayoutCount = $oLayoutModel->getInstalledLayoutCount('P');
$mobileLayoutCount = $oLayoutModel->getInstalledLayoutCount('M');