Browse Source

Update module manager first while updating the panel

DieFeM 7 năm trước cách đây
mục cha
commit
daba7dcb14
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      modules/update/updating.php

+ 11 - 0
modules/update/updating.php

@@ -264,9 +264,20 @@ function exec_ogp_module()
 				require_once('modules/modulemanager/module_handling.php');
 
 				$modules = $db->getInstalledModules();
+				// update module manager first
+				foreach ( $modules as $row )
+				{
+					if($row['folder'] == 'modulemanager')
+					{
+						update_module($db, $row['id'], $row['folder']);
+						break;
+					}
+				}
 				
 				foreach ( $modules as $row )
 				{
+					if($row['folder'] == 'modulemanager')//already updated
+						continue;
 					update_module($db, $row['id'], $row['folder']);
 				}
 				print_success(get_lang("update_complete"));