Add a maintenance script to remove all users from a User Group
[lhc/web/wiklou.git] / maintenance / doMaintenance.php
index f3fb32c..1f1a4c7 100644 (file)
@@ -91,7 +91,7 @@ $maintenance->checkRequiredExtensions();
 $maintenance->setAgentAndTriggers();
 
 // Do the work
-$maintenance->execute();
+$success = $maintenance->execute();
 
 // Potentially debug globals
 $maintenance->globals();
@@ -111,3 +111,8 @@ if ( isset( $lbFactory ) ) {
        $lbFactory->commitMasterChanges( 'doMaintenance' );
        $lbFactory->shutdown( $lbFactory::SHUTDOWN_NO_CHRONPROT );
 }
+
+// Exit with an error status if execute() returned false
+if ( $success === false ) {
+       exit( 1 );
+}