mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Allow using reserved word as mid if it is identical to module name
This commit is contained in:
parent
2f3a387a62
commit
912229c881
1 changed files with 6 additions and 3 deletions
|
|
@ -497,12 +497,15 @@ class ModuleController extends Module
|
|||
}
|
||||
|
||||
// Check whether the module name already exists
|
||||
if(ModuleModel::isIDExists($args->mid))
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($args->module_srl);
|
||||
if($args->mid !== $module_info->mid && ModuleModel::isIDExists($args->mid))
|
||||
{
|
||||
return new BaseObject(-1, 'msg_module_name_exists');
|
||||
if ($args->module !== $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