issue 2498 when access to the page not a dashboard,

admin menu created also.


git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11334 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-09-19 02:44:43 +00:00
parent b696cc0e4b
commit 2eb8d34fcd
4 changed files with 39 additions and 28 deletions

View file

@ -113,13 +113,12 @@
$oAdminAdminModel = &getAdminModel('admin'); $oAdminAdminModel = &getAdminModel('admin');
$lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang(); $lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang();
$oMenuAdminModel = &getAdminModel('menu'); $menuPhpFile = $oAdminAdminModel->checkAdminMenu();
$menu_info = $oMenuAdminModel->getMenuByTitle($oAdminAdminModel->getAdminMenuName()); if(!$menuPhpFile)
Context::set('admin_menu_srl', $menu_info->menu_srl); {
return $this->setRedirectUrl(getUrl('', 'module', 'admin'));
if(!is_readable($menu_info->php_file)) return; }
include $menuPhpFile;
include $menu_info->php_file;
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
$moduleActionInfo = $oModuleModel->getModuleActionXml($module); $moduleActionInfo = $oModuleModel->getModuleActionXml($module);

View file

@ -31,26 +31,6 @@
$oDB = &DB::getInstance(); $oDB = &DB::getInstance();
if(!$oDB->isColumnExists("admin_favorite", "type")) return true; if(!$oDB->isColumnExists("admin_favorite", "type")) return true;
// for admin menu
if(Context::isInstalled())
{
$oMenuAdminModel = &getAdminModel('menu');
$output = $oMenuAdminModel->getMenuByTitle($this->adminMenuName);
if(!$output->menu_srl)
{
$oAdminClass = &getClass('admin');
$oAdminClass->createXeAdminMenu();
}
else if(!is_readable($output->php_file))
{
$oMenuAdminController = &getAdminController('menu');
$oMenuAdminController->makeXmlFile($output->menu_srl);
}
$this->_oldAdminmenuDelete();
}
return false; return false;
} }
@ -89,6 +69,30 @@
function recompileCache() { function recompileCache() {
} }
public function checkAdminMenu()
{
// for admin menu
if(Context::isInstalled())
{
$oMenuAdminModel = &getAdminModel('menu');
$output = $oMenuAdminModel->getMenuByTitle($this->adminMenuName);
if(!$output->menu_srl)
{
$oAdminClass = &getClass('admin');
$oAdminClass->createXeAdminMenu();
}
else if(!is_readable(FileHandler::getRealPath($output->php_file)))
{
$oMenuAdminController = &getAdminController('menu');
$oMenuAdminController->makeXmlFile($output->menu_srl);
}
$this->_oldAdminmenuDelete();
return FileHandler::getRealPath($output->php_file);
}
}
/** /**
* Regenerate xe admin default menu * Regenerate xe admin default menu
* @return void * @return void

View file

@ -9,7 +9,7 @@
<action name="dispMenuAdminManagement" type="view" standalone="true" /> <action name="dispMenuAdminManagement" type="view" standalone="true" />
<action name="dispMenuAdminMidList" type="view" standalone="true" /> <action name="dispMenuAdminMidList" type="view" standalone="true" />
<action name="dispMenuAdminSiteMap" type="view" standalone="true" admin_index="true" menu_name="siteMap" menu_index="true" /> <action name="dispMenuAdminSiteMap" type="view" standalone="true" admin_index="true" menu_name="siteMap" menu_index="true" />
<action name="dispMenuAdminSiteDesign" type="view" standalone="true" menu_name="siteDesign" /> <action name="dispMenuAdminSiteDesign" type="view" standalone="true" menu_name="siteDesign" menu_index="true" />
<action name="getMenuAdminTplInfo" type="model" standalone="true" /> <action name="getMenuAdminTplInfo" type="model" standalone="true" />
<action name="getMenuAdminItemInfo" type="model" standalone="true" /> <action name="getMenuAdminItemInfo" type="model" standalone="true" />

View file

@ -216,6 +216,14 @@
$this->setTemplateFile('sitemap'); $this->setTemplateFile('sitemap');
} }
/**
* Site design admin page
* @return void
*/
public function dispMenuAdminSiteDesign()
{
}
/** /**
* Setting menu information(recursive) * Setting menu information(recursive)
* @param array $menu * @param array $menu