Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -45,9 +45,11 @@ |
46 | 46 | */ |
47 | 47 | protected static function injectStyleAndJS() { |
48 | 48 | global $wgOut, $wgUser, $wgFlaggedRevStyleVersion; |
49 | | - if ( $wgOut->hasHeadItem( 'FlaggedRevs' ) ) { |
| 49 | + static $loadedModules = false; |
| 50 | + if ( $loadedModules ) { |
50 | 51 | return true; # Don't double-load |
51 | 52 | } |
| 53 | + $loadedModules = true; |
52 | 54 | $fa = FlaggedArticleView::globalArticleInstance(); |
53 | 55 | # Try to only add to relevant pages |
54 | 56 | if ( !$fa || !$fa->isReviewable() ) { |