own3mall 7 лет назад
Родитель
Сommit
15ed35ba26
2 измененных файлов с 13 добавлено и 11 удалено
  1. 8 3
      includes/helpers.php
  2. 5 8
      modules/update/updating.php

+ 8 - 3
includes/helpers.php

@@ -405,9 +405,14 @@ function runPostUpdateOperations(){
 		if(function_exists("updateCronJobsToNewApi")){
 			updateCronJobsToNewApi();
 		}
-		if(function_exists("updateAllPanelModules")){
-			updateAllPanelModules();
-		}
+	}
+	
+	if(function_exists("updateAllPanelModules")){
+		updateAllPanelModules();
+	}
+	
+	if(function_exists("removeOldPanelFiles")){
+		removeOldPanelFiles();
 	}
 }
 

+ 5 - 8
modules/update/updating.php

@@ -282,18 +282,15 @@ function exec_ogp_module()
 				}
 				print_success(get_lang("update_complete")); 
 				
-				if(function_exists("removeOldPanelFiles")){
-					removeOldPanelFiles();
-				}
-				
-				if(function_exists("runPostUpdateOperations")){
-					runPostUpdateOperations();
-				}
-				
 				// Inject AJAX to run post update operations again (which will reload functions and helpers in case there are changes there we need now that aren't available once this script finishes running
 				echo '<script type="text/javascript">
 					     $.get("home.php?m=update&p=postupdate", function(msg){});
 					  </script>';
+				
+				// Run post update ops
+				if(function_exists("runPostUpdateOperations")){
+					runPostUpdateOperations();
+				}
 			}
 			else
 			{