http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73436
Revision: 73436
Author: tomasz
Date: 2010-09-21 01:45:42 +0000 (Tue, 21 Sep 2010)
Log Message:
-----------
Sync up deployment for testing changes
Modified Paths:
--------------
branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
branches/wmf/1.16wmf4/extensions/CentralNotice/patches/patch-notice_countries.sql
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
/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
/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/CentralNotice.php
===================================================================
--- branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
2010-09-21 01:41:10 UTC (rev 73435)
+++ branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php
2010-09-21 01:45:42 UTC (rev 73436)
@@ -51,6 +51,8 @@
// smallish if you will. :)
$wgNoticeServerTimeout = 0;
+$cnDebug = '';
+
// Source for live counter information
$wgNoticeCounterSource = "http://donate.wikimedia.org/counter.php";
Modified:
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
===================================================================
--- branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
2010-09-21 01:41:10 UTC (rev 73435)
+++ branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php
2010-09-21 01:45:42 UTC (rev 73436)
@@ -64,9 +64,11 @@
* Generate JSON for the specified site
*/
function getJsonList() {
+ global $cnDebug;
// Quick short circuit to be able to show preferred notices
$templates = array();
+ $cnDebug = ' //';
if ( $this->language == 'en' && $this->project != null ) {
// See if we have any preferred notices for all of en
@@ -76,6 +78,7 @@
// Pull banners
$templates =
CentralNoticeDB::selectTemplatesAssigned( $notices );
}
+ $cnDebug .= ' 1';
}
if ( !$templates && $this->project == 'wikipedia' ) {
@@ -86,14 +89,16 @@
// Pull banners
$templates =
CentralNoticeDB::selectTemplatesAssigned( $notices );
}
+ $cnDebug .= ' 2';
}
// Didn't find any preferred matches so do an old style lookup
if ( !$templates ) {
$templates = CentralNotice::selectNoticeTemplates(
$this->project, $this->language, $this->location );
+ $cnDebug .= ' 3';
}
- return FormatJson::encode( $templates );
+ return FormatJson::encode( $templates ) . $cnDebug;
}
}
Modified:
branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
===================================================================
--- branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
2010-09-21 01:41:10 UTC (rev 73435)
+++ branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php
2010-09-21 01:45:42 UTC (rev 73436)
@@ -1005,6 +1005,8 @@
* @return A 2D array of running banners with associated weights and
settings
*/
static function selectNoticeTemplates( $project, $language, $location =
null ) {
+ global $cnDebug, $wgDBname;
+
$campaigns = array();
$dbr = wfGetDB( DB_SLAVE );
$encTimestamp = $dbr->addQuotes( $dbr->timestamp() );
@@ -1065,6 +1067,7 @@
$campaigns[] = $row->not_id;
}
}
+ $cnDebug .= ' campaigns: '.count( $campaigns ).' database:
'.$wgDBname;
$templates = array();
if ( $campaigns ) {
Modified:
branches/wmf/1.16wmf4/extensions/CentralNotice/patches/patch-notice_countries.sql
===================================================================
---
branches/wmf/1.16wmf4/extensions/CentralNotice/patches/patch-notice_countries.sql
2010-09-21 01:41:10 UTC (rev 73435)
+++
branches/wmf/1.16wmf4/extensions/CentralNotice/patches/patch-notice_countries.sql
2010-09-21 01:45:42 UTC (rev 73436)
@@ -5,4 +5,4 @@
nc_country varchar(2) NOT NULL
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/nc_notice_id_country ON
/*$wgDBprefix*/cn_notice_countries (nc_notice_id, nc_country);
-ALTER TABLE /*$wgDBprefix*/cn_notices ADD not_geo BOOLEAN NOT NULL DEFAULT '0'
AFTER not_locked;
+ALTER TABLE /*$wgDBprefix*/cn_notices ADD not_geo bool NOT NULL DEFAULT '0'
AFTER not_locked;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs