mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
issue 2746 when re-create cache file, homeSitemap.php file re-create also
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12391 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
06b41e6d10
commit
509370c9d6
1 changed files with 32 additions and 0 deletions
|
|
@ -100,6 +100,15 @@ class menu extends ModuleObject
|
|||
function recompileCache()
|
||||
{
|
||||
$oMenuAdminController = &getAdminController('menu');
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
|
||||
// get home module id
|
||||
$oModuleModel = &getModel('module');
|
||||
$columnList = array('modules.mid',);
|
||||
$output = $oModuleModel->getSiteInfo(0, $columnList);
|
||||
$homeModuleMid = $output->mid;
|
||||
$homeMenuSrl = NULL;
|
||||
|
||||
// Wanted list of all the blog module
|
||||
$output = executeQueryArray("menu.getMenus");
|
||||
$list = $output->data;
|
||||
|
|
@ -109,6 +118,29 @@ class menu extends ModuleObject
|
|||
{
|
||||
$menu_srl = $menu_item->menu_srl;
|
||||
$oMenuAdminController->makeXmlFile($menu_srl);
|
||||
|
||||
// for homeSitemap.php regenrate
|
||||
if(!$homeMenuSrl)
|
||||
{
|
||||
$menuItemList = $oMenuAdminModel->getMenuItems($menu_srl);
|
||||
|
||||
if(is_array($menuItemList->data))
|
||||
{
|
||||
foreach($menuItemList->data AS $key=>$value)
|
||||
{
|
||||
if($homeModuleMid == $value->url)
|
||||
{
|
||||
$homeMenuSrl = $menu_srl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($homeMenuSrl)
|
||||
{
|
||||
$oMenuAdminController->makeHomemenuCacheFile($homeMenuSrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue