r7784 getModuleExtend() 보완

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7752 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2010-10-11 06:56:24 +00:00
parent 5c1391e06e
commit 5b8d3321cb
2 changed files with 15 additions and 6 deletions

View file

@ -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;
}