mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-05 01:52:17 +09:00
GET 일 경우에만 404 에러를 내도록 수정
This commit is contained in:
parent
67cc800f28
commit
8cbc379280
1 changed files with 11 additions and 11 deletions
|
|
@ -170,12 +170,19 @@ class ModuleHandler extends Handler
|
||||||
{
|
{
|
||||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($this->document_srl);
|
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($this->document_srl);
|
||||||
|
|
||||||
// redirect, if the document does not exist
|
// If the document does not exist, remove document_srl
|
||||||
if(!$module_info)
|
if(!$module_info)
|
||||||
{
|
{
|
||||||
$this->error = 'The document does not exist';
|
if(Context::getRequestMethod() == 'GET')
|
||||||
$this->httpStatusCode = '404';
|
{
|
||||||
return true;
|
$this->error = 'The document does not exist';
|
||||||
|
$this->httpStatusCode = '404';
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset($this->document_srl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -471,7 +478,6 @@ class ModuleHandler extends Handler
|
||||||
// If there is no such action in the module object
|
// If there is no such action in the module object
|
||||||
if(!isset($xml_info->action->{$this->act}) || !method_exists($oModule, $this->act))
|
if(!isset($xml_info->action->{$this->act}) || !method_exists($oModule, $this->act))
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!Context::isInstalled())
|
if(!Context::isInstalled())
|
||||||
{
|
{
|
||||||
self::_setInputErrorToContext();
|
self::_setInputErrorToContext();
|
||||||
|
|
@ -766,10 +772,6 @@ class ModuleHandler extends Handler
|
||||||
}
|
}
|
||||||
self::_setInputValueToSession();
|
self::_setInputValueToSession();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if($error != 0)
|
if($error != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -945,13 +947,11 @@ class ModuleHandler extends Handler
|
||||||
|
|
||||||
if($layout_srl && !$oModule->getLayoutFile())
|
if($layout_srl && !$oModule->getLayoutFile())
|
||||||
{
|
{
|
||||||
|
|
||||||
// If layout_srl exists, get information of the layout, and set the location of layout_path/ layout_file
|
// If layout_srl exists, get information of the layout, and set the location of layout_path/ layout_file
|
||||||
$oLayoutModel = getModel('layout');
|
$oLayoutModel = getModel('layout');
|
||||||
$layout_info = $oLayoutModel->getLayout($layout_srl);
|
$layout_info = $oLayoutModel->getLayout($layout_srl);
|
||||||
if($layout_info)
|
if($layout_info)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Input extra_vars into $layout_info
|
// Input extra_vars into $layout_info
|
||||||
if($layout_info->extra_var_count)
|
if($layout_info->extra_var_count)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue