Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -176,13 +176,7 @@ |
177 | 177 | // behavior below, since it is the same as ("&stable=1"). |
178 | 178 | if( $old ) { |
179 | 179 | $revs_since = FlaggedRevs::getRevCountSince( $article, $frev->getRevId() ); |
180 | | - global $wgUseStableTemplates; |
181 | | - if( $wgUseStableTemplates ) { |
182 | | - $rev = Revision::newFromId( $frev->getRevId() ); |
183 | | - $text = $rev->getText(); |
184 | | - } else { |
185 | | - $text = $frev->getExpandedText(); |
186 | | - } |
| 180 | + $text = $frev->getTextForParse(); |
187 | 181 | $parserOut = FlaggedRevs::parseStableText( $article, $text, $frev->getRevId() ); |
188 | 182 | # Construct some tagging for non-printable outputs. Note that the pending |
189 | 183 | # notice has all this info already, so don't do this if we added that already. |
— | — | @@ -286,13 +280,7 @@ |
287 | 281 | # Get parsed stable version |
288 | 282 | $parserOut = FlaggedRevs::getPageCache( $article ); |
289 | 283 | if( $parserOut==false ) { |
290 | | - global $wgUseStableTemplates; |
291 | | - if( $wgUseStableTemplates ) { |
292 | | - $rev = Revision::newFromId( $frev->getRevId() ); |
293 | | - $text = $rev->getText(); |
294 | | - } else { |
295 | | - $text = $frev->getExpandedText(); |
296 | | - } |
| 284 | + $text = $frev->getTextForParse(); |
297 | 285 | $parserOut = FlaggedRevs::parseStableText( $article, $text, $frev->getRevId() ); |
298 | 286 | # Update the stable version cache |
299 | 287 | FlaggedRevs::updatePageCache( $article, $parserOut ); |