mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Update more modules to throw exceptions
This commit is contained in:
parent
c1cbc5dbdb
commit
be1ce69073
21 changed files with 142 additions and 116 deletions
|
|
@ -130,7 +130,7 @@ class layoutAdminController extends layout
|
|||
$output = executeQuery('menu.getMenuItemByUrl', $tmpArgs);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $this->setError('fail_to_update');
|
||||
throw new Rhymix\Framework\Exception('fail_to_update');
|
||||
}
|
||||
|
||||
$menu_srl = $output->data->menu_srl;
|
||||
|
|
@ -313,7 +313,7 @@ class layoutAdminController extends layout
|
|||
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $this->setError($output->message);
|
||||
throw new Rhymix\Framework\Exception($output->message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ class layoutAdminController extends layout
|
|||
|
||||
if(!$layout_srl || !$code || !$is_post)
|
||||
{
|
||||
return $this->setError('msg_invalid_request');
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
|
|
@ -377,7 +377,7 @@ class layoutAdminController extends layout
|
|||
function procLayoutAdminCodeReset()
|
||||
{
|
||||
$layout_srl = Context::get('layout_srl');
|
||||
if(!$layout_srl) return $this->setError('msg_invalid_request');
|
||||
if(!$layout_srl) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
// delete user layout file
|
||||
$oLayoutModel = getModel('layout');
|
||||
|
|
@ -480,13 +480,13 @@ class layoutAdminController extends layout
|
|||
$oModuleModel = getModel('module');
|
||||
|
||||
$mid = Context::get('mid');
|
||||
if(!$mid) return $this->setError('msg_invalid_request');
|
||||
if(!$mid) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$columnList = array('layout_srl');
|
||||
$module_info = $oModuleModel->getModuleInfoByMid($mid, $site_module_info->site_srl, $columnList);
|
||||
$layout_srl = $module_info->layout_srl;
|
||||
if(!$layout_srl) return $this->setError('msg_invalid_request');
|
||||
if(!$layout_srl) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue