#285 action_forward가 제대로 작동하지 않는 오류 해결, #242 action_forward 관련 캐시 기능 정상화

This commit is contained in:
khongchi 2014-01-21 17:40:18 +09:00
parent c3daf779d7
commit 0f1b20eb50
2 changed files with 19 additions and 14 deletions

View file

@ -20,7 +20,7 @@
<img widget="login_info" skin="default" />
<!-- /ACCOUNT -->
<!-- SEARCH -->
<form action="{getUrl()}" method="get" class="search">
<form action="{getUrl()}" method="post" class="search">
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="act" value="IS" />

View file

@ -565,7 +565,7 @@ class moduleModel extends module
/**
* @brief Get forward value by the value of act
*/
function getActionForward($act, $module = '')
function getActionForward($act)
{
// cache controll
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
@ -575,28 +575,33 @@ class moduleModel extends module
$action_forward = $oCacheHandler->get($cache_key);
}
// retrieve and caching all registered action_forward
if(!$action_forward)
{
$args = new stdClass();
$args->act = $act;
$args->module = ($module) ? $module : null;
if(strlen($args->module) > 0)
$output = executeQueryArray('module.getActionForward',$args);
$action_forward = array();
foreach($output->data as $item)
{
$output = executeQuery('module.getActionForwardWithModule', $args);
$action_forward[$item->act] = $item;
}
else
{
$output = executeQuery('module.getActionForward',$args);
}
$action_forward = $output->data;
debugPrint($action_forward);
if($oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, $action_forward);
}
}
return $action_forward;
if($action_forward[$act])
{
return $action_forward[$act];
}
else
{
return new stdClass();
}
}
/**