mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 05:09:56 +09:00
merge sandbox to trunk for 1.4.4.2
git-svn-id: http://xe-core.googlecode.com/svn/trunk@7944 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9139515e57
commit
f59deeb270
131 changed files with 11605 additions and 4218 deletions
|
|
@ -70,9 +70,7 @@
|
|||
* @return true: OK, false: redirected
|
||||
**/
|
||||
function init() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel->loadModuleExtends();
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
if(!$this->document_srl && $this->mid && $this->entry) {
|
||||
|
|
@ -283,6 +281,7 @@
|
|||
if($this->module == "admin" && $type == "view")
|
||||
{
|
||||
$oMemberModel = &getModel('member');
|
||||
|
||||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin=='Y') {
|
||||
$orig_module->loadSideBar();
|
||||
|
|
@ -426,22 +425,19 @@
|
|||
* @remarks if there exists a module instance created before, returns it.
|
||||
**/
|
||||
function &getModuleInstance($module, $type = 'view', $kind = '') {
|
||||
|
||||
$parent_module = $module;
|
||||
if(__DEBUG__==3) $start_time = getMicroTime();
|
||||
|
||||
if($kind != 'admin') $kind = 'svc';
|
||||
|
||||
if(is_array($GLOBALS['__MODULE_EXTEND__'])) {
|
||||
$extend_module = $GLOBALS['__MODULE_EXTEND__'][$module.'.'.($kind=='svc'?'':'admin').'.'.$type];
|
||||
if($extend_module && file_exists(FileHandler::getRealPath(ModuleHandler::getModulePath($extend_module)))) {
|
||||
$module = $extend_module;
|
||||
}else{
|
||||
unset($extend_module);
|
||||
}
|
||||
$key = $module.'.'.($kind!='admin'?'':'admin').'.'.$type;
|
||||
if(is_array($GLOBALS['__MODULE_EXTEND__']) && array_key_exists($key, $GLOBALS['__MODULE_EXTEND__'])) {
|
||||
$module = $extend_module = $GLOBALS['__MODULE_EXTEND__'][$key];
|
||||
}else{
|
||||
unset($parent_module);
|
||||
}
|
||||
|
||||
$class_path = ModuleHandler::getModulePath($module);
|
||||
if(!is_dir(_XE_PATH_.$class_path)) return NULL;
|
||||
if(!is_dir(FileHandler::getRealPath($class_path))) return NULL;
|
||||
|
||||
// if there is no instance of the module in global variable, create a new one
|
||||
if(!$GLOBALS['_loaded_module'][$module][$type][$kind]) {
|
||||
|
|
@ -457,49 +453,51 @@
|
|||
case 'controller' :
|
||||
if($kind == 'admin') {
|
||||
$instance_name = sprintf("%sAdmin%s",$module,"Controller");
|
||||
$class_file = sprintf('%s%s%s.admin.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s.admin.%s.php', $class_path, $module, $type);
|
||||
} else {
|
||||
$instance_name = sprintf("%s%s",$module,"Controller");
|
||||
$class_file = sprintf('%s%s%s.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
|
||||
}
|
||||
break;
|
||||
case 'model' :
|
||||
if($kind == 'admin') {
|
||||
$instance_name = sprintf("%sAdmin%s",$module,"Model");
|
||||
$class_file = sprintf('%s%s%s.admin.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s.admin.%s.php', $class_path, $module, $type);
|
||||
} else {
|
||||
$instance_name = sprintf("%s%s",$module,"Model");
|
||||
$class_file = sprintf('%s%s%s.%s.php', _XE_PATH_, $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
|
||||
}
|
||||
break;
|
||||
case 'api' :
|
||||
$instance_name = sprintf("%s%s",$module,"API");
|
||||
$class_file = sprintf('%s%s%s.api.php', _XE_PATH_, $class_path, $module);
|
||||
$class_file = sprintf('%s%s.api.php', $class_path, $module);
|
||||
break;
|
||||
case 'wap' :
|
||||
$instance_name = sprintf("%s%s",$module,"WAP");
|
||||
$class_file = sprintf('%s%s%s.wap.php', _XE_PATH_, $class_path, $module);
|
||||
$class_file = sprintf('%s%s.wap.php', $class_path, $module);
|
||||
break;
|
||||
case 'mobile' :
|
||||
$instance_name = sprintf("%s%s",$module,"Mobile");
|
||||
$class_file = sprintf("%s%s%s.mobile.php", _XE_PATH_, $class_path, $module);
|
||||
$class_file = sprintf("%s%s.mobile.php", $class_path, $module);
|
||||
break;
|
||||
case 'class' :
|
||||
$instance_name = $module;
|
||||
$class_file = sprintf('%s%s%s.class.php', _XE_PATH_, $class_path, $module);
|
||||
$class_file = sprintf('%s%s.class.php', $class_path, $module);
|
||||
break;
|
||||
default :
|
||||
$type = 'view';
|
||||
if($kind == 'admin') {
|
||||
$instance_name = sprintf("%sAdmin%s",$module,"View");
|
||||
$class_file = sprintf('%s%s%s.admin.view.php', _XE_PATH_, $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s.admin.view.php', $class_path, $module, $type);
|
||||
} else {
|
||||
$instance_name = sprintf("%s%s",$module,"View");
|
||||
$class_file = sprintf('%s%s%s.view.php', _XE_PATH_, $class_path, $module, $type);
|
||||
$class_file = sprintf('%s%s.view.php', $class_path, $module, $type);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$class_file = FileHandler::getRealPath($class_file);
|
||||
|
||||
// Get the name of the class file
|
||||
if(!file_exists($class_file)) return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -244,6 +244,14 @@
|
|||
// stop_proc==true이면 그냥 패스
|
||||
if($this->stop_proc) return false;
|
||||
|
||||
// trigger call
|
||||
$triggerOutput = ModuleHandler::triggerCall('moduleObject.proc', 'before', $this);
|
||||
if(!$triggerOutput->toBool()) {
|
||||
$this->setError($triggerOutput->getError());
|
||||
$this->setMessage($triggerOutput->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
// addon 실행(called_position 를 before_module_proc로 하여 호출)
|
||||
$called_position = 'before_module_proc';
|
||||
$oAddonController = &getController('addon');
|
||||
|
|
@ -266,8 +274,15 @@
|
|||
else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// trigger call
|
||||
$triggerOutput = ModuleHandler::triggerCall('moduleObject.proc', 'after', $this);
|
||||
if(!$triggerOutput->toBool()) {
|
||||
$this->setError($triggerOutput->getError());
|
||||
$this->setMessage($triggerOutput->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
// addon 실행(called_position 를 after_module_proc로 하여 호출)
|
||||
$called_position = 'after_module_proc';
|
||||
$oAddonController = &getController('addon');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue