mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Fix isIDExists() error when installing member module for the first time
This commit is contained in:
parent
9bb2e40ef4
commit
566c1f54b7
2 changed files with 3 additions and 3 deletions
|
|
@ -23,13 +23,13 @@ class ModuleModel extends Module
|
|||
/**
|
||||
* @brief Check if mid is available
|
||||
*/
|
||||
public static function isIDExists($id)
|
||||
public static function isIDExists($id, $module = null)
|
||||
{
|
||||
if (!preg_match('/^[a-z]{1}([a-z0-9_]+)$/i', $id))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Context::isReservedWord(strtolower($id)))
|
||||
if (Context::isReservedWord(strtolower($id)) && $id !== $module)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue