stop()사용시에도 http status code 적용

This commit is contained in:
conory 2016-04-19 16:02:42 +09:00
parent 649e25ab63
commit 0cb9958319
2 changed files with 8 additions and 8 deletions

View file

@ -897,7 +897,6 @@ class ModuleHandler extends Handler
$methodList = array('XMLRPC' => 1, 'JSON' => 1, 'JS_CALLBACK' => 1);
if(!isset($methodList[Context::getRequestMethod()]))
{
if($_SESSION['XE_VALIDATOR_RETURN_URL'])
{
header('location: ' . $_SESSION['XE_VALIDATOR_RETURN_URL']);
@ -914,15 +913,14 @@ class ModuleHandler extends Handler
$oMessageObject->setMessage($this->error);
$oMessageObject->dispMessage();
if($oMessageObject->getHttpStatusCode() && $oMessageObject->getHttpStatusCode() != '200')
// display Error Page
if($oMessageObject->getHttpStatusCode() && !in_array($oMessageObject->getHttpStatusCode(), array('200', '403')))
{
self::_setHttpStatusMessage($oMessageObject->getHttpStatusCode());
if($oMessageObject->getHttpStatusCode() != '403')
{
$oMessageObject->setTemplateFile('http_status_code');
}
$oMessageObject->setTemplateFile('http_status_code');
}
self::_setHttpStatusMessage($oMessageObject->getHttpStatusCode());
// If module was called normally, change the templates of the module into ones of the message view module
if($oModule)
{

View file

@ -236,6 +236,8 @@ class ModuleObject extends Object
$this->setTemplatePath($oMessageObject->getTemplatePath());
$this->setTemplateFile($oMessageObject->getTemplateFile());
$this->setHttpStatusCode($oMessageObject->getHttpStatusCode());
ModuleHandler::_setHttpStatusMessage($oMessageObject->getHttpStatusCode());
return $this;
}