Browse Source

Minor Fixes

own3mall 7 years ago
parent
commit
15ed35ba26
2 changed files with 13 additions and 11 deletions
  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")){
 		if(function_exists("updateCronJobsToNewApi")){
 			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")); 
 				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
 				// 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">
 				echo '<script type="text/javascript">
 					     $.get("home.php?m=update&p=postupdate", function(msg){});
 					     $.get("home.php?m=update&p=postupdate", function(msg){});
 					  </script>';
 					  </script>';
+				
+				// Run post update ops
+				if(function_exists("runPostUpdateOperations")){
+					runPostUpdateOperations();
+				}
 			}
 			}
 			else
 			else
 			{
 			{