mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
getActionForward() 에서 값이 없을 경우 빈 리턴을 하도록 개선
rss 모듈의 action forward가 등록되지 않는 문제 수정 (기존 서드파티에도 같은 문제가 발생될 것 같아 이렇게 수정함)
This commit is contained in:
parent
89fcea58c9
commit
bacca5d025
2 changed files with 14 additions and 16 deletions
|
|
@ -546,8 +546,6 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
return $oMessageObject;
|
||||
}
|
||||
|
||||
$forward = NULL;
|
||||
|
||||
// 1. Look for the module with action name
|
||||
if(preg_match('/^([a-z]+)([A-Z])([a-z0-9\_]+)(.*)$/', $this->act, $matches))
|
||||
|
|
@ -575,12 +573,12 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
if(!$forward)
|
||||
if(empty($forward->module))
|
||||
{
|
||||
$forward = $oModuleModel->getActionForward($this->act);
|
||||
}
|
||||
|
||||
if($forward->module && $forward->type && $forward->act && $forward->act == $this->act)
|
||||
if(!empty($forward->module))
|
||||
{
|
||||
$kind = stripos($forward->act, 'admin') !== FALSE ? 'admin' : '';
|
||||
$type = $forward->type;
|
||||
|
|
@ -703,7 +701,7 @@ class ModuleHandler extends Handler
|
|||
// ruleset check...
|
||||
if(!empty($ruleset))
|
||||
{
|
||||
$rulesetModule = $forward->module ? $forward->module : $this->module;
|
||||
$rulesetModule = !empty($forward->module) ? $forward->module : $this->module;
|
||||
$rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid);
|
||||
if(!empty($rulesetFile))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -567,10 +567,12 @@ class moduleModel extends module
|
|||
if($action_forward === null)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$output = executeQueryArray('module.getActionForward',$args);
|
||||
if(!$output->toBool()) return new stdClass;
|
||||
if(!$output->data) $output->data = array();
|
||||
|
||||
$output = executeQueryArray('module.getActionForward', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$action_forward = array();
|
||||
foreach($output->data as $item)
|
||||
{
|
||||
|
|
@ -579,15 +581,13 @@ class moduleModel extends module
|
|||
|
||||
Rhymix\Framework\Cache::set('action_forward', $action_forward, 0, true);
|
||||
}
|
||||
|
||||
if($action_forward[$act])
|
||||
|
||||
if(!isset($action_forward[$act]))
|
||||
{
|
||||
return $action_forward[$act];
|
||||
}
|
||||
else
|
||||
{
|
||||
return new stdClass();
|
||||
return;
|
||||
}
|
||||
|
||||
return $action_forward[$act];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue