http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73443
Revision: 73443
Author: tomasz
Date: 2010-09-21 02:56:46 +0000 (Tue, 21 Sep 2010)
Log Message:
-----------
Syncing up to head of trunk
Modified Paths:
--------------
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
Property Changed:
----------------
branches/wmf/1.16wmf4/extensions/CentralNotice/
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/wmf-deployment/extensions/CentralNotice:60970
/trunk/extensions/CentralNotice:62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73406,73433,73435,73437,73439
/trunk/phase3/extensions/CentralNotice:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816
+ /branches/wmf-deployment/extensions/CentralNotice:60970
/trunk/extensions/CentralNotice:62820-67552,67557,67559-71720,71725-71731,71734-71739,71748-71753,71774-71997,72058-72131,72136-73406,73433,73435,73437,73439,73441-73442
/trunk/phase3/extensions/CentralNotice:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816
Modified:
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
===================================================================
--- branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
2010-09-21 02:46:36 UTC (rev 73442)
+++ branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
2010-09-21 02:56:46 UTC (rev 73443)
@@ -18,12 +18,8 @@
}
function execute( $par ) {
- global $wgOut, $wgRequest, $wgDBname, $wgCentralDBname;
+ global $wgOut, $wgRequest;
- // Temporarily switch to central wiki database
- $localDBname = $wgDBname;
- $wgDBname = $wgCentralDBname;
-
$wgOut->disable();
$this->sendHeaders();
@@ -47,9 +43,6 @@
} else {
echo "/* No site specified */";
}
-
- // Switch back to local wiki database
- $wgDBname = $localDBname;
}
/**
Modified:
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
===================================================================
--- branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
2010-09-21 02:46:36 UTC (rev 73442)
+++ branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
2010-09-21 02:56:46 UTC (rev 73443)
@@ -1005,8 +1005,10 @@
* @return A 2D array of running banners with associated weights and
settings
*/
static function selectNoticeTemplates( $project, $language, $location =
null ) {
+ global $wgCentralDBname;
+
$campaigns = array();
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_SLAVE, array(), $wgCentralDBname );
$encTimestamp = $dbr->addQuotes( $dbr->timestamp() );
// Pull non-geotargeted campaigns
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs