mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Notify user if a module appears to be installed in an incorrect path (e.g. xe-modulename-master)
This commit is contained in:
parent
2ba01e521a
commit
00d17ec8fc
5 changed files with 32 additions and 4 deletions
|
|
@ -311,10 +311,11 @@ class adminAdminView extends admin
|
|||
// Get list of modules
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = $oModuleModel->getModuleList();
|
||||
$addTables = false;
|
||||
$wrongPaths = [];
|
||||
$needUpdate = false;
|
||||
if(is_array($module_list))
|
||||
{
|
||||
$needUpdate = FALSE;
|
||||
$addTables = FALSE;
|
||||
$priority = array(
|
||||
'module' => 1000000,
|
||||
'member' => 100000,
|
||||
|
|
@ -344,6 +345,10 @@ class adminAdminView extends admin
|
|||
{
|
||||
$needUpdate = TRUE;
|
||||
}
|
||||
if (!preg_match('/^[a-z0-9_]+$/i', $value->module))
|
||||
{
|
||||
$wrongPaths[] = $value->module;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -370,6 +375,7 @@ class adminAdminView extends admin
|
|||
Context::set('module_list', $module_list);
|
||||
Context::set('needUpdate', false);
|
||||
Context::set('addTables', $addTables);
|
||||
Context::set('wrongPaths', $wrongPaths);
|
||||
Context::set('needUpdate', $needUpdate);
|
||||
Context::set('newVersionList', $needUpdateList);
|
||||
Context::set('counterAddonActivated', $counterAddonActivated);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue