r67698 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67697‎ | r67698 | r67699 >
Date:10:15, 9 June 2010
Author:liangent
Status:deferred
Tags:
Comment:
Add revision ids of js/css pages to URLs to have them auto-reloaded by users' browsers when they are changed on the wiki
Modified paths:
  • /trunk/extensions/Gadgets/Gadgets.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Gadgets/Gadgets.php
@@ -202,12 +202,12 @@
203203 if ( !$t ) continue;
204204
205205 if ( preg_match( '/\.js/', $codePage ) ) {
206 - $u = $t->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType );
 206+ $u = $t->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType . '&' . $t->getLatestRevID() );
207207 //switched to addScriptFile call to support scriptLoader
208208 $out->addScriptFile( $u );
209209 }
210210 else if ( preg_match( '/\.css/', $codePage ) ) {
211 - $u = $t->getLocalURL( 'action=raw&ctype=text/css' );
 211+ $u = $t->getLocalURL( 'action=raw&ctype=text/css&' . $t->getLatestRevID() );
212212 $out->addScript( Html::linkedStyle( $u ) );
213213 }
214214 }

Status & tagging log