changed make admin menu logic, added reset admin menu function

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9071 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-07 02:19:04 +00:00
parent e4d9b43320
commit 986053ac4d
6 changed files with 40 additions and 20 deletions

View file

@ -8,12 +8,27 @@
class adminAdminView extends admin {
var $layout_list;
var $xeMenuTitle;
/**
* @brief Initilization
* @return none
**/
function init() {
// admin menu check
$this->xeMenuTitle = '__XE_ADMIN__';
$oMenuAdminModel = &getAdminModel('menu');
$output = $oMenuAdminModel->getMenuByTitle($this->xeMenuTitle);
if(!$output->menu_srl)
{
parent::_createXeAdminMenu();
}
else if(!is_readable($output->php_file))
{
$oMenuAdminController = &getAdminController('menu');
$oMenuAdminController->makeXmlFile($output->menu_srl);
}
// forbit access if the user is not an administrator
$oMemberModel = &getModel('member');
@ -60,7 +75,6 @@
if(is_readable($menu_info->php_file))
include $menu_info->php_file;
else {
header('location:'.getNotEncodedUrl('', 'module', 'admin'));
return;
}