mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Always update module module first
This commit is contained in:
parent
9a158fde7e
commit
36b8ce75c5
1 changed files with 20 additions and 1 deletions
|
|
@ -312,7 +312,26 @@ class adminAdminView extends admin
|
||||||
{
|
{
|
||||||
$needUpdate = FALSE;
|
$needUpdate = FALSE;
|
||||||
$addTables = FALSE;
|
$addTables = FALSE;
|
||||||
foreach($module_list AS $key => $value)
|
$priority = array(
|
||||||
|
'module' => 1000000,
|
||||||
|
'member' => 100000,
|
||||||
|
'document' => 10000,
|
||||||
|
'comment' => 1000,
|
||||||
|
'file' => 100,
|
||||||
|
);
|
||||||
|
usort($module_list, function($a, $b) use($priority) {
|
||||||
|
$a_priority = isset($priority[$a->module]) ? $priority[$a->module] : 0;
|
||||||
|
$b_priority = isset($priority[$b->module]) ? $priority[$b->module] : 0;
|
||||||
|
if ($a_priority == 0 && $b_priority == 0)
|
||||||
|
{
|
||||||
|
return strcmp($a->module, $b->module);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return $b_priority - $a_priority;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
foreach($module_list as $value)
|
||||||
{
|
{
|
||||||
if($value->need_install)
|
if($value->need_install)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue