mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Replace $this->stop() with proper exceptions
This commit is contained in:
parent
5b7ce90a3d
commit
d8a0773b97
26 changed files with 109 additions and 69 deletions
|
|
@ -140,11 +140,11 @@ class layoutAdminView extends layout
|
|||
$layout = Context::get('layout');
|
||||
|
||||
if(!in_array($type, array('P', 'M'))) $type = 'P';
|
||||
if(!$layout) return $this->stop('msg_invalid_request');
|
||||
if(!$layout) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayoutInfo($layout, null, $type);
|
||||
if(!$layout_info) return $this->stop('msg_invalid_request');
|
||||
if(!$layout_info) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
Context::set('layout_info', $layout_info);
|
||||
|
||||
|
|
@ -175,10 +175,10 @@ class layoutAdminView extends layout
|
|||
|
||||
// Get layout info
|
||||
$layout = Context::get('layout');
|
||||
if($layout == 'faceoff') return $this->stop('not supported');
|
||||
if($layout == 'faceoff') throw new Rhymix\Framework\Exception('not supported');
|
||||
|
||||
$layout_info = $oModel->getLayoutInfo($layout, null, $type);
|
||||
if(!$layout_info) return $this->stop('msg_invalid_request');
|
||||
if(!$layout_info) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
// get Menu list
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue