Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1112,7 +1112,9 @@ |
1113 | 1113 | } |
1114 | 1114 | |
1115 | 1115 | public static function overrideRedirect( &$title, $request, &$ignoreRedirect, &$target ) { |
1116 | | - if( !FlaggedRevs::isPageReviewable( $title ) ) { |
| 1116 | + # Get an instance on the title ($wgTitle) |
| 1117 | + $fa = FlaggedArticle::getTitleInstance( $title ); |
| 1118 | + if( !$fa->isReviewable() ) { |
1117 | 1119 | return true; |
1118 | 1120 | } |
1119 | 1121 | if( $request->getVal( 'stableid' ) ) { |
— | — | @@ -1124,10 +1126,11 @@ |
1125 | 1127 | $data = $wgMemc->get($key); |
1126 | 1128 | if( is_object($data) && count($data->value) == 2 && $data->time >= $title->getTouched() ) { |
1127 | 1129 | list($ignoreRedirect,$target) = $data->value; |
1128 | | - # Get an instance on the title ($wgTitle) and save to process cache |
1129 | | - } else { |
1130 | | - $flaggedArticle = FlaggedArticle::getTitleInstance( $title ); |
1131 | | - if( $flaggedArticle->pageOverride() && $srev = $flaggedArticle->getStableRev( FR_TEXT ) ) { |
| 1130 | + return true; |
| 1131 | + } |
| 1132 | + if( $srev = $flaggedArticle->getStableRev() ) { |
| 1133 | + # If synced, nothing special here... |
| 1134 | + if( $srev->getRevId() != $title->getLatestRevID() && $fa->pageOverride() ) { |
1132 | 1135 | $text = $srev->getRevText(); |
1133 | 1136 | $redirect = $flaggedArticle->followRedirectText( $text ); |
1134 | 1137 | if( $redirect ) { |
— | — | @@ -1135,9 +1138,9 @@ |
1136 | 1139 | } else { |
1137 | 1140 | $ignoreRedirect = true; |
1138 | 1141 | } |
| 1142 | + $data = FlaggedRevs::makeMemcObj( array($ignoreRedirect,$target) ); |
| 1143 | + $wgMemc->set( $key, $data, $wgParserCacheExpireTime ); |
1139 | 1144 | } |
1140 | | - $data = FlaggedRevs::makeMemcObj( array($ignoreRedirect,$target) ); |
1141 | | - $wgMemc->set( $key, $data, $wgParserCacheExpireTime ); |
1142 | 1145 | } |
1143 | 1146 | } |
1144 | 1147 | return true; |
— | — | @@ -1240,12 +1243,9 @@ |
1241 | 1244 | } |
1242 | 1245 | |
1243 | 1246 | public static function isFileCacheable( &$article ) { |
1244 | | - if( !FlaggedRevs::isPageReviewable( $article->getTitle() ) ) { |
1245 | | - return true; |
1246 | | - } |
1247 | 1247 | $fa = FlaggedArticle::getInstance( $article ); |
1248 | 1248 | # If the stable is the default, and we are viewing it...cache it! |
1249 | | - if( $fa->showStableByDefault() ) { |
| 1249 | + if( $fa->isReviewable() && $fa->showStableByDefault() ) { |
1250 | 1250 | return ( $fa->pageOverride() && $fa->getStableRev() ); |
1251 | 1251 | # If the draft is the default, and we are viewing it...cache it! |
1252 | 1252 | } else { |
Index: trunk/extensions/ConfirmAccount/SpecialConfirmAccount.php |
— | — | @@ -204,7 +204,7 @@ |
205 | 205 | function efLoadConfirmAccount() { |
206 | 206 | global $wgUser; |
207 | 207 | # Don't load unless needed |
208 | | - if( $wgUser->isAllowed('confirmaccount') ) { |
| 208 | + if( $wgUser->getId() && $wgUser->isAllowed('confirmaccount') ) { |
209 | 209 | efConfirmAccountInjectStyle(); |
210 | 210 | } |
211 | 211 | } |