r55854 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55853‎ | r55854 | r55855 >
Date:19:40, 5 September 2009
Author:ialex
Status:deferred (Comments)
Tags:todo 
Comment:
Fix for r55810: oly set $optionsWithArgs if it's not defined, as in the old version; when defined by scripts, it's always set before including commandLine.inc, and thus setting it always to an empty array will break these scripts
Modified paths:
  • /trunk/phase3/maintenance/commandLine.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/commandLine.inc
@@ -4,8 +4,11 @@
55 * Backwards-compatibility wrapper for old-style maintenance scripts
66 */
77 require( dirname(__FILE__) . '/Maintenance.php' );
8 -$optionsWithArgs = array();
98
 9+if ( !isset( $optionsWithArgs ) ) {
 10+ $optionsWithArgs = array();
 11+}
 12+
1013 class CommandLineInc extends Maintenance {
1114 public function __construct() {
1215 global $optionsWithArgs;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55810* Rewrote commandLine.inc to be a simple wrapper around Maintenance.php...tstarling08:02, 4 September 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   21:03, 8 September 2009

This kinda sucks, but is status quo. Should revisit later.

Status & tagging log