mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 2127 "return ModuleObject" code added in ModuleHandler (when error occured)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3@10858 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
16db1f4c36
commit
c131aefc3e
1 changed files with 33 additions and 6 deletions
|
|
@ -212,7 +212,17 @@
|
|||
if(!$this->act) {
|
||||
$this->error = 'msg_module_is_not_exists';
|
||||
$this->httpStatusCode = '404';
|
||||
return;
|
||||
|
||||
$type = Mobile::isFromMobilePhone() ? 'mobile' : 'view';
|
||||
$oMessageObject = &ModuleHandler::getModuleInstance('message',$type);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
$oMessageObject->dispMessage();
|
||||
if($this->httpStatusCode)
|
||||
{
|
||||
$oMessageObject->setHttpStatusCode($this->httpStatusCode);
|
||||
}
|
||||
return $oMessageObject;
|
||||
}
|
||||
|
||||
// get type, kind
|
||||
|
|
@ -271,9 +281,16 @@
|
|||
}
|
||||
|
||||
if(!is_object($oModule)) {
|
||||
$this->error = 'msg_module_is_not_exists';
|
||||
$this->httpStatusCode = '404';
|
||||
return;
|
||||
$type = Mobile::isFromMobilePhone() ? 'mobile' : 'view';
|
||||
$oMessageObject = &ModuleHandler::getModuleInstance('message',$type);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
$oMessageObject->dispMessage();
|
||||
if($this->httpStatusCode)
|
||||
{
|
||||
$oMessageObject->setHttpStatusCode($this->httpStatusCode);
|
||||
}
|
||||
return $oMessageObject;
|
||||
}
|
||||
|
||||
// If there is no such action in the module object
|
||||
|
|
@ -283,7 +300,15 @@
|
|||
if(!Context::isInstalled())
|
||||
{
|
||||
$this->error = 'msg_invalid_request';
|
||||
return;
|
||||
$oMessageObject = &ModuleHandler::getModuleInstance('message',$type);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
$oMessageObject->dispMessage();
|
||||
if($this->httpStatusCode)
|
||||
{
|
||||
$oMessageObject->setHttpStatusCode($this->httpStatusCode);
|
||||
}
|
||||
return $oMessageObject;
|
||||
}
|
||||
|
||||
$forward = null;
|
||||
|
|
@ -369,7 +394,9 @@
|
|||
else
|
||||
{
|
||||
$this->error = 'msg_invalid_request';
|
||||
return;
|
||||
$oModule->setError(-1);
|
||||
$oModule->setMessage($this->error);
|
||||
return $oModule;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue