mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +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
|
|
@ -250,9 +250,18 @@ class editorAdminController extends editor
|
|||
$args->enabled = $enabled;
|
||||
$args->site_srl = $site_srl;
|
||||
// Check if the component exists
|
||||
if(!$site_srl) $output = executeQuery('editor.isComponentInserted', $args);
|
||||
else $output = executeQuery('editor.isSiteComponentInserted', $args);
|
||||
if($output->data->count) return $this->setError('msg_component_is_not_founded');
|
||||
if(!$site_srl)
|
||||
{
|
||||
$output = executeQuery('editor.isComponentInserted', $args);
|
||||
{
|
||||
else
|
||||
{
|
||||
$output = executeQuery('editor.isSiteComponentInserted', $args);
|
||||
}
|
||||
if($output->data->count)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_component_is_not_founded');
|
||||
}
|
||||
// Inert a component
|
||||
$args->list_order = getNextSequence();
|
||||
if(!$site_srl) $output = executeQuery('editor.insertComponent', $args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue