r45187 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45186‎ | r45187 | r45188 >
Date:15:28, 30 December 2008
Author:raymond
Status:ok
Tags:
Comment:
Add $wgAmazonPlusJSVersion. Bump the version number every time you change AmazonPlus.js
This ensures that clients get the latest .js
Note: Could $wgAmazonPlusDecimal be replaced by $wgLang->formatnum() calls?
Modified paths:
  • /trunk/extensions/AmazonPlus/AmazonPlus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AmazonPlus/AmazonPlus.php
@@ -47,7 +47,7 @@
4848 'name' => 'AmazonPlus',
4949 'description' => 'A highly customizable extension to display Amazon information',
5050 'descriptionmsg' => 'amazonplus-desc',
51 - 'version' => '0.3',
 51+ 'version' => '0.3.1',
5252 'url' => 'http://www.mediawiki.org/wiki/Extension:AmazonPlus',
5353 'author' => 'Ryan Schmidt',
5454 );
@@ -62,6 +62,7 @@
6363
6464 $wgHooks['BeforePageDisplay'][] = 'efAmazonPlusJavascript';
6565
 66+$wgAmazonPlusJSVersion = 1; # Bump the version number every time you change AmazonPlus.js
6667 $wgAmazonPlusAWS = ''; # Amazon AWS Id. Required
6768 $wgAmazonPlusAssociates = array(); # Amazon Associates IDs, per locale.Example: array( 'us' => 'myamazonid', 'fr' => 'myfrenchid' ); Required
6869 $wgAmazonPlusDefaultSearch = 'Books'; # Default search type, can be Books, DVDs, etc.
@@ -84,7 +85,7 @@
8586 # Set up the javascript
8687 function efAmazonPlusJavascript( &$out, $sk ) {
8788 global $wgScriptPath;
88 - $src = $wgScriptPath . '/extensions/AmazonPlus/AmazonPlus.js';
 89+ $src = $wgScriptPath . "/extensions/AmazonPlus/AmazonPlus.js?$wgAmazonPlusJSVersion";
8990 $out->addScript( '<script type="text/javascript" src="' . $src . '"></script>' . "\n" );
9091 return true;
9192 }

Status & tagging log