Followup r80205: scripts using commandLine.inc were failing the shouldExecute() check...
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 14 Jan 2011 02:13:30 +0000 (02:13 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 14 Jan 2011 02:13:30 +0000 (02:13 +0000)
Scripts using this entry point cannot be included standalone for uses as classes, they will always execute.

But then again, if you're not subclassing Maintenance then why are you bothering to write a class in a command line script?

maintenance/doMaintenance.php

index e930cc6..0ed50ba 100644 (file)
@@ -32,7 +32,9 @@ if ( !defined( 'RUN_MAINTENANCE_IF_MAIN' ) ) {
 }
 
 // Wasn't included from the file scope, halt execution (probably wanted the class)
-if( !Maintenance::shouldExecute() ) {
+// If a class is using commandLine.inc (old school maintenance), they definitely
+// cannot be included and will proceed with execution
+if( !Maintenance::shouldExecute() && $maintClass != 'CommandLineInc' ) {
        return;
 }