r90098 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90097‎ | r90098 | r90099 >
Date:23:24, 14 June 2011
Author:yaron
Status:deferred (Comments)
Tags:
Comment:
Follow-up to r86041 and r89569 - re-added backwards compatibility with MW < 1.18
Modified paths:
  • /trunk/extensions/ReplaceText/ReplaceTextJob.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReplaceText/ReplaceTextJob.php
@@ -45,8 +45,12 @@
4646 if ( class_exists( 'WatchAction' ) ) {
4747 // Class was added in MW 1.19
4848 WatchAction::doWatch( $new_title, $wgUser );
 49+ } elseif ( class_exists( 'Action' ) ) {
 50+ // Class was added in MW 1.18
 51+ Action::factory( 'watch', new Article( $new_title, 0 ) )->execute();
4952 } else {
50 - Action::factory( 'watch', new Article( $new_title, 0 ) )->execute();
 53+ $article = new Article( $new_title );
 54+ $article->doWatch();
5155 }
5256 }
5357 $wgUser = $actual_user;

Follow-up revisions

RevisionCommit summaryAuthorDate
r90110Follow-up to r90098 - added '0' as second parameter for 'new Article()'yaron13:13, 15 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86041r86001, now with less scariness :P I took out the delete action and did purg...happy-melon10:38, 14 April 2011
r89569Follow-up to r89547 - re-added compatibility with MW < 1.9yaron15:15, 6 June 2011

Comments

#Comment by Nikerabbit (talk | contribs)   05:48, 15 June 2011

Definitely needs zero for the second parameter in Article constructor, as jobs are sometimes run during web requests.

#Comment by Yaron Koren (talk | contribs)   13:15, 15 June 2011

Nikerabbit - thanks; I just added that in.

Status & tagging log