r80231 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80230‎ | r80231 | r80232 >
Date:02:13, 14 January 2011
Author:demon
Status:ok
Tags:
Comment:
Followup r80205: scripts using commandLine.inc were failing the shouldExecute() check due to extra require()s.

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?
Modified paths:
  • /trunk/phase3/maintenance/doMaintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/doMaintenance.php
@@ -32,7 +32,9 @@
3333 }
3434
3535 // Wasn't included from the file scope, halt execution (probably wanted the class)
36 -if( !Maintenance::shouldExecute() ) {
 36+// If a class is using commandLine.inc (old school maintenance), they definitely
 37+// cannot be included and will proceed with execution
 38+if( !Maintenance::shouldExecute() && $maintClass != 'CommandLineInc' ) {
3739 return;
3840 }
3941

Follow-up revisions

RevisionCommit summaryAuthorDate
r805501.17: MFT r80106, r80137, r80138, r80205, r80210, r80222, r80223, r80231, r80...catrope02:09, 19 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80205Fix concern raised by Brion in r74108 (but has really existed since the maint...demon22:58, 13 January 2011

Status & tagging log