r78163 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78162‎ | r78163 | r78164 >
Date:01:01, 10 December 2010
Author:aaron
Status:ok
Tags:
Comment:
Follow-up r78027: Fixed injectStyleAndJS() check to avoid adding css/js twice
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -45,9 +45,11 @@
4646 */
4747 protected static function injectStyleAndJS() {
4848 global $wgOut, $wgUser, $wgFlaggedRevStyleVersion;
49 - if ( $wgOut->hasHeadItem( 'FlaggedRevs' ) ) {
 49+ static $loadedModules = false;
 50+ if ( $loadedModules ) {
5051 return true; # Don't double-load
5152 }
 53+ $loadedModules = true;
5254 $fa = FlaggedArticleView::globalArticleInstance();
5355 # Try to only add to relevant pages
5456 if ( !$fa || !$fa->isReviewable() ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r78340Merged r78163 from trunkpdhanda23:26, 13 December 2010
r80733MFT first round of FlaggedRevs fixes r78517, r78346, r78319, r78293, r78226, ...demon23:56, 21 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78027Fix for bug 26128. Also needs r78023 and r78018pdhanda22:47, 7 December 2010

Status & tagging log