r75844 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75843‎ | r75844 | r75845 >
Date:23:39, 1 November 2010
Author:tomasz
Status:ok
Tags:
Comment:
Syncing to head of trunk at 75470
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/CentralNotice (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerController.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
@@ -143,8 +143,8 @@
144144 function efCentralNoticeLoader( $out, $skin ) {
145145 global $wgUser, $wgOut, $wgCentralDBname;
146146
147 - $centralLoader = SpecialPage::getTitleFor( 'BannerController' )->getLocalUrl();
148 -
 147+ // Include '.js' to exempt script from squid cache override
 148+ $centralLoader = SpecialPage::getTitleFor( 'BannerController' )->getLocalUrl( 'cache=/cn.js' );
149149
150150 // Insert the banner controller Javascript into the <head>
151151 $wgOut->addScriptFile( $centralLoader );
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerController.php
@@ -68,8 +68,8 @@
6969 } else {
7070 var geoLocation = Geo.country; // pull the geo info
7171 }
72 - var bannerListPage = 'Special:BannerListLoader?language='+wgContentLanguage+'&project='+wgNoticeProject+'&country='+geoLocation;
73 - bannerListURL = wgArticlePath.replace( '$1', bannerListPage );
 72+ var bannerListQuery = $.param( { 'language': wgContentLanguage, 'project': wgNoticeProject, 'country': geoLocation } );
 73+ var bannerListURL = wgScript + '?title=' + wgFormattedNamespaces[-1] + ':BannerListLoader&cache=/cn.js&' + bannerListQuery;
7474 var request = $.ajax( {
7575 url: bannerListURL,
7676 dataType: 'json',
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice
___________________________________________________________________
Modified: svn:mergeinfo
7777 Merged /trunk/extensions/CentralNotice:r75376-75470

Status & tagging log