own3mall пре 7 година
родитељ
комит
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
 			{