mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 16:19:58 +09:00
r7784 getModuleExtend() 보완
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7752 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5c1391e06e
commit
5b8d3321cb
2 changed files with 15 additions and 6 deletions
|
|
@ -84,7 +84,8 @@
|
|||
**/
|
||||
function insertModuleExtend($parent_module, $extend_module, $type, $kind=''){
|
||||
if($kind != 'admin') $kind = '';
|
||||
if(!in_array($type,array('model','controller','view'))) return;
|
||||
if(!in_array($type,array('model','controller','view','api','mobile'))) return false;
|
||||
if(in_array($parent_module, array('module','addon','widget','layout'))) return false;
|
||||
|
||||
$cache_file = './files/config/module_extend.php';
|
||||
FileHandler::removeFile($cache_file);
|
||||
|
|
@ -94,8 +95,10 @@
|
|||
$args->type = $type;
|
||||
$args->kind = $kind;
|
||||
|
||||
$output = executeQuery('module.getModuleExtendCount', $args);
|
||||
if($output->data->count>0) return false;
|
||||
|
||||
$output = executeQuery('module.insertModuleExtend', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -298,10 +298,16 @@
|
|||
/**
|
||||
* @brief 특정 module extend 가져옴
|
||||
**/
|
||||
function getModuleExtend($parent_module, $extend_module, $type, $kind='') {
|
||||
function getModuleExtend($parent_module, $type, $kind='') {
|
||||
$key = $parent_module.'.'.$kind.'.'.$type;
|
||||
|
||||
$module_extend_info = $this->loadModuleExtends();
|
||||
$extend = $module_extend_info[$parent_module.'.'.$kind.'.'.$type];
|
||||
return $extend;
|
||||
if(array_key_exists($key, $module_extend_info))
|
||||
{
|
||||
return $module_extend_info[$key];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -323,7 +329,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
$str = '<?PHP $__module_extend_info__=array(%s); return $__module_extend_info__; ?>';
|
||||
$str = '<?PHP return array(%s); ?>';
|
||||
$str = sprintf($str, join(',',$arr));
|
||||
|
||||
FileHandler::writeFile($cache_file, $str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue