r112284 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112283‎ | r112284 | r112285 >
Date:01:16, 24 February 2012
Author:aaron
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1/extensions (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/FlaggedRevs (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php
@@ -193,7 +193,7 @@
194194 $title = Title::makeTitle( NS_FILE, $title->getDBkey() );
195195 $title->resetArticleId( $title->getArticleId() ); // avoid extra queries
196196 }
197 - $time = $sha1 = false; // current version
 197+ $time = $sha1 = false; // unspecified (defaults to current version)
198198 # Check for the version of this file used when reviewed...
199199 list( $maybeTS, $maybeSha1 ) = $incManager->getReviewedFileVersion( $title );
200200 if ( $maybeTS !== null ) {
@@ -209,15 +209,17 @@
210210 $sha1 = $maybeSha1;
211211 }
212212 }
213 - # Stabilize the file link
214 - if ( $time ) {
215 - if ( $query != '' ) $query .= '&';
216 - $query = "filetimestamp=" . urlencode( wfTimestamp( TS_MW, $time ) );
217 - }
218 - $options['time'] = $time;
219 - $options['sha1'] = $sha1;
 213+ # Tell Parser what file version to use
220214 if ( $time === '0' ) {
221215 $options['broken'] = true;
 216+ } elseif ( $time !== false ) {
 217+ $options['time'] = $time;
 218+ $options['sha1'] = $sha1;
 219+ # Stabilize the file link
 220+ if ( $query != '' ) {
 221+ $query .= '&';
 222+ }
 223+ $query .= "filetimestamp=" . urlencode( wfTimestamp( TS_MW, $time ) );
222224 }
223225
224226 return true;
Property changes on: branches/wmf/1.19wmf1/extensions/FlaggedRevs
___________________________________________________________________
Modified: svn:mergeinfo
225227 Merged /trunk/extensions/FlaggedRevs:r112282
Property changes on: branches/wmf/1.19wmf1/extensions
___________________________________________________________________
Modified: svn:mergeinfo
226228 Merged /trunk/extensions:r112260,112282

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112282Fixes to parserFetchStableFile() hook:...aaron01:13, 24 February 2012

Status & tagging log