mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Use ModuleModel::isIDExists() to check mid validity when updating module, just like when inserting
This commit is contained in:
parent
a4f5b5d0a9
commit
bb013dd28a
1 changed files with 1 additions and 3 deletions
|
|
@ -497,14 +497,12 @@ class ModuleController extends Module
|
|||
}
|
||||
|
||||
// Check whether the module name already exists
|
||||
$output = executeQuery('module.isExistsModuleName', $args);
|
||||
if(!$output->toBool() || $output->data->count)
|
||||
if(ModuleModel::isIDExists($args->mid))
|
||||
{
|
||||
return new BaseObject(-1, 'msg_module_name_exists');
|
||||
}
|
||||
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($args->module_srl);
|
||||
|
||||
$args->browser_title = escape(strip_tags($args->browser_title ?? $module_info->browser_title), false);
|
||||
$args->description = isset($args->description) ? escape($args->description, false) : null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue