r37416 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37415‎ | r37416 | r37417 >
Date:17:36, 9 July 2008
Author:aaron
Status:old
Tags:
Comment:
Use showStableByDefault() to deal with per-page config
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -147,15 +147,6 @@
148148 return empty(self::$dimensions);
149149 }
150150
151 - /**
152 - * Do anons see the stable version by default?
153 - * @returns bool
154 - */
155 - public static function publicViewStableByDefault() {
156 - global $wgFlaggedRevsOverride, $wgFlaggedRevsExceptions;
157 - return ($wgFlaggedRevsOverride && !in_array('*',$wgFlaggedRevsExceptions) );
158 - }
159 -
160151 ################# Parsing functions #################
161152
162153 /**
@@ -2121,7 +2112,7 @@
21222113 public static function isFileCacheable( $article ) {
21232114 $fa = FlaggedArticle::getInstance( $article );
21242115 # If the stable is the default, and we are viewing it...cache it!
2125 - if( self::publicViewStableByDefault() ) {
 2116+ if( $fa->showStableByDefault() ) {
21262117 return ( $fa->pageOverride() && $fa->getStableRev( true ) );
21272118 # If the draft is the default, and we are viewing it...cache it!
21282119 } else {

Status & tagging log