r78027 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78026‎ | r78027 | r78028 >
Date:22:47, 7 December 2010
Author:pdhanda
Status:resolved (Comments)
Tags:
Comment:
Fix for bug 26128. Also needs r78023 and r78018
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -58,8 +58,7 @@
5959 $encCssFile = htmlspecialchars( "$stylePath/flaggedrevs.css?$wgFlaggedRevStyleVersion" );
6060 $encJsFile = htmlspecialchars( "$stylePath/flaggedrevs.js?$wgFlaggedRevStyleVersion" );
6161 # Add CSS file
62 - $linkedStyle = Html::linkedStyle( $encCssFile );
63 - $wgOut->addHeadItem( 'FlaggedRevs', $linkedStyle );
 62+ $wgOut->addExtensionStyle( $encCssFile );
6463 # Add main JS file
6564 $wgOut->includeJQuery();
6665 $wgOut->addScriptFile( $encJsFile );

Follow-up revisions

RevisionCommit summaryAuthorDate
r78163Follow-up r78027: Fixed injectStyleAndJS() check to avoid adding css/js twiceaaron01:01, 10 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
r78018Improves on r77693 by ensuring site styles are loaded just before user styles.tparscal21:45, 7 December 2010
r78020This fix wors for bug 26128 on the deployment branch. Still working for a fix...pdhanda22:10, 7 December 2010
r78023Improves on r77693 by placing ResourceLoader "only styles" CSS links together...tparscal22:27, 7 December 2010

Comments

#Comment by Aaron Schulz (talk | contribs)   02:47, 8 December 2010

"if ( $wgOut->hasHeadItem( 'FlaggedRevs' ) )" is dead code now. It should be replaced with a generic "if(already called) return;" to avoid adding the JS <script> tags twice on diffs and such.

#Comment by Aaron Schulz (talk | contribs)   00:57, 10 December 2010

Partially reverts r75331.

Status & tagging log