시스템 에러 메세지를 출력할 경우 403 HTTP 코드로 설정

This commit is contained in:
conory 2016-04-18 23:43:04 +09:00
parent 9e78008fe6
commit f930ec74f8
10 changed files with 35 additions and 27 deletions

View file

@ -31,27 +31,16 @@ class messageView extends message
if(!$config->skin)
{
$config->skin = 'xedition';
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
}
else
{
//check theme
$config_parse = explode('|@|', $config->skin);
if (count($config_parse) > 1)
{
$template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
}
else
{
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
}
}
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
// Template path
$this->setTemplatePath($template_path);
// Get the member configuration
$member_config = $oModuleModel->getModuleConfig('member');
Context::set('member_config', $member_config);
// Set a flag to check if the https connection is made when using SSL and create https url
$ssl_mode = false;
if($member_config->enable_ssl == 'Y')
@ -64,6 +53,12 @@ class messageView extends message
Context::set('system_message_detail', nl2br($detail));
$this->setTemplateFile('system_message');
// Default 403 Error
if(!$this->getHttpStatusCode() || $this->getHttpStatusCode() === '200')
{
$this->setHttpStatusCode('403');
}
}
}
/* End of file message.view.php */