issue 160 when add menu in sitemap,

get module list change to trigger method.


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9219 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-09-20 06:00:09 +00:00
parent da1ef5ac65
commit 3f9d1d2779
2 changed files with 14 additions and 12 deletions

View file

@ -221,5 +221,18 @@
$this->add('tpl', str_replace("\n"," ",$tpl));
}
/**
* @brief when menu add in sitemap, select module list
* this menu showing with trigger
**/
function getModuleListInSitemap()
{
// after trigger
$moduleList = array('page');
$output = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
if(!$output->toBool()) return $output;
return $moduleList;
}
}
?>

View file

@ -139,18 +139,7 @@
Context::set('menu_list', $menuList);
// get installed module list
$oModuleModel = &getModel('module');
$output = $oModuleModel->getModuleList();
if(is_array($output))
{
$installedModuleList = array();
foreach($output AS $key=>$value)
{
array_push($installedModuleList, $value->module);
}
$useModuleList = array('board', 'forum', 'wiki', 'page');
}
$resultModuleList = array_intersect($installedModuleList, $useModuleList);
$resultModuleList = $oMenuAdminModel->getModuleListInSitemap();
Context::set('module_list', $resultModuleList);
// get default group list