Procházet zdrojové kódy

check for enabled immediately before execute to ensure we can run

Tim Fry před 1 rokem
rodič
revize
e500de96ed
1 změnil soubory, kde provedl 5 přidání a 2 odebrání
  1. 5 2
      resources/classes/maintenance_service.php

+ 5 - 2
resources/classes/maintenance_service.php

@@ -238,8 +238,11 @@ class maintenance_service extends service {
 			//reload settings before executing the tasks to capture changes
 			$this->reload_settings();
 
-			//run all registered apps
-			$this->run_maintenance();
+			//check that we are still enabled after reload before we execute again
+			if ($this->enabled && !empty($this->execute_time)) {
+				//run all registered apps
+				$this->run_maintenance();
+			}
 		}
 		return 0;
 	}