mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -487,6 +487,7 @@ class installController extends install
|
|||
|
||||
// Determine the order of module installation depending on category
|
||||
$install_step = array('system','content','member');
|
||||
$update_order = [];
|
||||
|
||||
// Install all the remaining modules
|
||||
foreach($install_step as $category)
|
||||
|
|
@ -497,7 +498,7 @@ class installController extends install
|
|||
{
|
||||
if($module == 'module') continue;
|
||||
$this->installModule($module, sprintf('./modules/%s', $module));
|
||||
$this->updateModule($module);
|
||||
$update_order[] = $module;
|
||||
}
|
||||
unset($modules[$category]);
|
||||
}
|
||||
|
|
@ -514,12 +515,18 @@ class installController extends install
|
|||
{
|
||||
if($module == 'module') continue;
|
||||
$this->installModule($module, sprintf('./modules/%s', $module));
|
||||
$this->updateModule($module);
|
||||
$update_order[] = $module;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update all modules
|
||||
foreach ($update_order as $module)
|
||||
{
|
||||
$this->updateModule($module);
|
||||
}
|
||||
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue