r77354 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77353‎ | r77354 | r77355 >
Date:14:18, 27 November 2010
Author:reedy
Status:ok
Tags:
Comment:
$options doesn't exist in PurgeList

Change to getOptions, and addOption in Constructor
Modified paths:
  • /trunk/phase3/maintenance/doMaintenance.php (modified) (history)
  • /trunk/phase3/maintenance/purgeList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/doMaintenance.php
@@ -69,7 +69,7 @@
7070 $callback = MW_CONFIG_CALLBACK;
7171 # PHP 5.1 doesn't support "class::method" for call_user_func, so split it
7272 if ( strpos( $callback, '::' ) !== false ) {
73 - $callback = explode( '::', $callback, 2);
 73+ $callback = explode( '::', $callback, 2 );
7474 }
7575 call_user_func( $callback );
7676 } elseif ( file_exists( "$IP/wmf-config/wikimedia-mode" ) ) {
Index: trunk/phase3/maintenance/purgeList.php
@@ -26,6 +26,7 @@
2727 public function __construct() {
2828 parent::__construct();
2929 $this->mDescription = "Send purge requests for listed pages to squid";
 30+ $this->addOption( 'purge', 'Whether to update page touched.' , false, false );
3031 }
3132
3233 public function execute() {
@@ -42,7 +43,7 @@
4344 $url = $title->getFullUrl();
4445 $this->output( "$url\n" );
4546 $urls[] = $url;
46 - if ( isset( $options['purge'] ) ) {
 47+ if ( $this->getOptions( 'purge' ) ) {
4748 $title->invalidateCache();
4849 }
4950 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r78379Followup r77354: it's page_touched, with an underscorecatrope15:33, 14 December 2010
r91175Fix fatal in r77354 (!!), discovered this when purgeList.php fataled on me on...catrope15:15, 30 June 2011

Status & tagging log