mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
httpStatusCode 를 정수형으로 만들기
This commit is contained in:
parent
107996918e
commit
29507df48f
6 changed files with 12 additions and 12 deletions
|
|
@ -83,7 +83,7 @@ class DisplayHandler extends Handler
|
|||
|
||||
// header output
|
||||
$httpStatusCode = $oModule->getHttpStatusCode();
|
||||
if($httpStatusCode && $httpStatusCode != 200 && !in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON', 'JS_CALLBACK')))
|
||||
if($httpStatusCode !== 200 && !in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON', 'JS_CALLBACK')))
|
||||
{
|
||||
self::_printHttpStatusCode($httpStatusCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -925,7 +925,7 @@ class ModuleHandler extends Handler
|
|||
$oMessageObject->dispMessage();
|
||||
|
||||
// display Error Page
|
||||
if($oMessageObject->getHttpStatusCode() && !in_array($oMessageObject->getHttpStatusCode(), array('200', '403')))
|
||||
if(!in_array($oMessageObject->getHttpStatusCode(), array(200, 403)))
|
||||
{
|
||||
$oMessageObject->setTemplateFile('http_status_code');
|
||||
}
|
||||
|
|
@ -1062,7 +1062,7 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
|
||||
// Set http status code
|
||||
if($this->httpStatusCode && (!$oModule->getHttpStatusCode() || $oModule->getHttpStatusCode() == '200'))
|
||||
if($this->httpStatusCode && $oModule->getHttpStatusCode() === 200)
|
||||
{
|
||||
$oModule->setHttpStatusCode($this->httpStatusCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Object
|
|||
* http status code.
|
||||
* @var int
|
||||
*/
|
||||
var $httpStatusCode = NULL;
|
||||
var $httpStatusCode = 200;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -73,9 +73,9 @@ class Object
|
|||
* @param int $code HTTP status code. Default value is `200` that means successful
|
||||
* @return void
|
||||
*/
|
||||
function setHttpStatusCode($code = '200')
|
||||
function setHttpStatusCode($code = 200)
|
||||
{
|
||||
$this->httpStatusCode = $code;
|
||||
$this->httpStatusCode = (int) $code;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1138,7 +1138,7 @@ class boardView extends board
|
|||
{
|
||||
Context::set('message', lang($msg_code));
|
||||
|
||||
$this->setHttpStatusCode('403');
|
||||
$this->setHttpStatusCode(403);
|
||||
$this->setTemplateFile('message');
|
||||
}
|
||||
|
||||
|
|
@ -1191,7 +1191,7 @@ class boardView extends board
|
|||
$script = sprintf('<script> jQuery(function(){ alert("%s"); } );</script>', lang($message));
|
||||
Context::addHtmlFooter($script);
|
||||
|
||||
$this->setHttpStatusCode('403');
|
||||
$this->setHttpStatusCode(403);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@ class messageMobile extends messageView
|
|||
$this->setTemplateFile('system_message');
|
||||
|
||||
// Default 403 Error
|
||||
if(!$this->getHttpStatusCode() || $this->getHttpStatusCode() == '200')
|
||||
if($this->getHttpStatusCode() === 200)
|
||||
{
|
||||
$this->setHttpStatusCode('403');
|
||||
$this->setHttpStatusCode(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ class messageView extends message
|
|||
$this->setTemplateFile('system_message');
|
||||
|
||||
// Default 403 Error
|
||||
if(!$this->getHttpStatusCode() || $this->getHttpStatusCode() == '200')
|
||||
if($this->getHttpStatusCode() === 200)
|
||||
{
|
||||
$this->setHttpStatusCode('403');
|
||||
$this->setHttpStatusCode(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue