mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
issue 2619 model to view
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11879 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
945c3f34fd
commit
32bf25b332
3 changed files with 39 additions and 68 deletions
|
|
@ -336,73 +336,6 @@
|
|||
return $moduleInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return module skin setting page (html type)
|
||||
* @return void
|
||||
*/
|
||||
public function getMenuAdminModuleSkin()
|
||||
{
|
||||
$menuItemSrl = Context::get('menu_item_srl');
|
||||
$skin = Context::get('skin');
|
||||
|
||||
if(!$menuItemSrl || !$skin)
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$menuItemInfo = $this->getMenuItemInfo($menuItemSrl);
|
||||
if(!$menuItemInfo->menu_item_srl)
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
// If menu type is not module
|
||||
if(empty($menuItemInfo->url) || preg_match('/^http/i', $menuItemInfo->url))
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($menuItemInfo->url);
|
||||
|
||||
$modulePath = './modules/'.$moduleInfo->module;
|
||||
$skinInfo = $oModuleModel->loadSkinInfo($modulePath, $skin);
|
||||
$skinVars = $oModuleModel->getModuleSkinVars($moduleInfo->module_srl);
|
||||
|
||||
if(count($skinInfo->extra_vars))
|
||||
{
|
||||
foreach($skinInfo->extra_vars as $key => $val)
|
||||
{
|
||||
$group = $val->group;
|
||||
$name = $val->name;
|
||||
$type = $val->type;
|
||||
if($skinVars[$name])
|
||||
{
|
||||
$value = $skinVars[$name]->value;
|
||||
}
|
||||
else $value = '';
|
||||
if($type=="checkbox")
|
||||
{
|
||||
$value = $value?unserialize($value):array();
|
||||
}
|
||||
|
||||
$value = empty($value) ? $val->default : $value;
|
||||
$skinInfo->extra_vars[$key]->value= $value;
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('module_info', $moduleInfo);
|
||||
Context::set('mid', $moduleInfo->mid);
|
||||
Context::set('skin_info', $skinInfo);
|
||||
Context::set('skin_vars', $skinVars);
|
||||
Context::set('mode', 'P');
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$skinContent = $oTemplate->compile($oModuleModel->module_path.'/tpl', 'skin_config');
|
||||
|
||||
$this->add('skinContent', $skinContent);
|
||||
}
|
||||
|
||||
public function getMenuAdminSiteMap()
|
||||
{
|
||||
$menuSrl = Context::get('menu_srl');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue