r72056 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72055‎ | r72056 | r72057 >
Date:22:04, 31 August 2010
Author:aaron
Status:ok
Tags:
Comment:
Removed $wgUseCurrentTemplates/$wgUseCurrentImages...not used by WMF (always true)
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -244,27 +244,12 @@
245245 # FR_INCLUDES_STABLE
246246 # Use the stable version of templates/files that themselves have a stable version
247247 # and the template/file version used at the time of review for those that don't have one
 248+# NOTE: We may have templates that do not have stable version. Given situational
 249+# inclusion of templates (e.g. parser functions selecting template X or Y based on date),
 250+# there may also be no "review time version" revision ID for a template used on a page.
 251+# In such cases, we select the current (unreviewed) revision. Likewise for files.
248252 $wgFlaggedRevsHandleIncludes = FR_INCLUDES_STABLE;
249253
250 -# NOTE: ignore the next two settings if set to FR_CURRENT_INCLUDES.
251 -
252 -# We may have templates that do not have stable version. Given situational
253 -# inclusion of templates (such as parser functions that select template
254 -# X or Y depending), there may also be no revision ID for each template
255 -# pointed to by the metadata of how the article was when it was reviewed.
256 -# An example would be an article that selects a template based on time.
257 -# The template to be selected will change, and the metadata only points
258 -# to the reviewed revision ID of the old template. In such cases, we can
259 -# select the current (unreviewed) revision.
260 -$wgUseCurrentTemplates = true;
261 -
262 -# We may have file pages that do not have stable version. Given situational
263 -# inclusion of templates/files (such as a random featured image template),
264 -# there may also be no sha-1/time for each file pointed to by the metadata
265 -# of how the article was when it was reviewed. In such cases, we can select
266 -# the current (unreviewed) revision.
267 -$wgUseCurrentImages = true;
268 -
269254 # End of configuration variables.
270255 # ########
271256
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -210,24 +210,6 @@
211211 }
212212
213213 /**
214 - * Fallback to current templates when no version is specified?
215 - * @returns bool
216 - */
217 - public static function fallbackToCurrentTemplates() {
218 - global $wgUseCurrentTemplates;
219 - return $wgUseCurrentTemplates;
220 - }
221 -
222 - /**
223 - * Fallback to current files when no version is specified?
224 - * @returns bool
225 - */
226 - public static function fallbackToCurrentFiles() {
227 - global $wgUseCurrentImages;
228 - return $wgUseCurrentImages;
229 - }
230 -
231 - /**
232214 * Should tags only be shown for unreviewed content for this user?
233215 * @returns bool
234216 */
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -363,9 +363,6 @@
364364 # If $id not specified, see if we are allowed to use the current revision
365365 if ( $id === false ) {
366366 $parser->mOutput->fr_includeErrors[] = $title->getPrefixedDBKey(); // unspecified
367 - if ( !FlaggedRevs::fallbackToCurrentTemplates() ) {
368 - $skip = true; // broken link
369 - }
370367 # If $id is zero, don't bother loading it
371368 } elseif ( !$id ) {
372369 $skip = true;
@@ -454,9 +451,6 @@
455452 if ( $time === false ) {
456453 # May want to give an error, so track these...
457454 $parser->mOutput->fr_includeErrors[] = $title->getPrefixedDBKey();
458 - if ( !FlaggedRevs::fallbackToCurrentFiles() ) {
459 - $time = "0"; // no image
460 - }
461455 } elseif ( !$time ) {
462456 $time = "0"; // make sure this the string '0'
463457 }

Status & tagging log