mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fix some modules not being updated during initial install
This commit is contained in:
parent
2af94e496e
commit
7b39fac881
2 changed files with 16 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* This script updates all modules.
|
||||
*
|
||||
*
|
||||
* Running this script on the CLI is better than clicking 'update' in the
|
||||
* admin dashboard because some module updates may take a long time.
|
||||
*/
|
||||
|
|
@ -47,10 +47,13 @@ $oInstallAdminController = getAdminController('install');
|
|||
foreach ($need_update as $module)
|
||||
{
|
||||
echo 'Updating ' . $module . '...' . PHP_EOL;
|
||||
$oModule = getModule($module, 'class');
|
||||
if ($oModule)
|
||||
$oModule = ModuleModel::getModuleInstallClass($module);
|
||||
if (is_object($oModule) && method_exists($oModule, 'checkUpdate') && method_exists($oModule, 'moduleUpdate'))
|
||||
{
|
||||
$oModule->moduleUpdate();
|
||||
if ($oModule->checkUpdate())
|
||||
{
|
||||
return $oModule->moduleUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue