mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +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
|
|
@ -23,7 +23,7 @@ class layoutAdminController extends layout
|
|||
*/
|
||||
function procLayoutAdminInsert()
|
||||
{
|
||||
if(Context::get('layout') == 'faceoff') return $this->stop('not supported');
|
||||
if(Context::get('layout') == 'faceoff') throw new Rhymix\Framework\Exception('not supported');
|
||||
|
||||
// Get information to create a layout
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
|
@ -683,7 +683,7 @@ class layoutAdminController extends layout
|
|||
*/
|
||||
function procLayoutAdminUserLayoutImport()
|
||||
{
|
||||
return $this->stop('not supported');
|
||||
throw new Rhymix\Framework\Exception('not supported');
|
||||
|
||||
// check upload
|
||||
if(!Context::isUploaded()) exit();
|
||||
|
|
@ -713,12 +713,12 @@ class layoutAdminController extends layout
|
|||
$sourceArgs = Context::getRequestVars();
|
||||
if($sourceArgs->layout == 'faceoff')
|
||||
{
|
||||
return $this->stop('not supported');
|
||||
throw new Rhymix\Framework\Exception('not supported');
|
||||
}
|
||||
|
||||
if(!$sourceArgs->layout_srl)
|
||||
{
|
||||
return $this->stop('msg_empty_origin_layout');
|
||||
throw new Rhymix\Framework\Exception('msg_empty_origin_layout');
|
||||
}
|
||||
|
||||
$oLayoutModel = getModel('layout');
|
||||
|
|
@ -731,7 +731,7 @@ class layoutAdminController extends layout
|
|||
|
||||
if(!is_array($sourceArgs->title) || count($sourceArgs->title) == 0)
|
||||
{
|
||||
return $this->stop('msg_empty_target_layout');
|
||||
throw new Rhymix\Framework\Exception('msg_empty_target_layout');
|
||||
}
|
||||
|
||||
$output = $oLayoutModel->getLayoutRawData($sourceArgs->layout_srl, array('extra_vars'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue