r78340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78339‎ | r78340 | r78341 >
Date:23:26, 13 December 2010
Author:pdhanda
Status:ok
Tags:
Comment:
Merged r78163 from trunk
Modified paths:
  • /branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: branches/priyanka-wmf-fixes/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() ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78163Follow-up r78027: Fixed injectStyleAndJS() check to avoid adding css/js twiceaaron01:01, 10 December 2010

Status & tagging log