http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73439
Revision: 73439
Author: kaldari
Date: 2010-09-21 02:33:24 +0000 (Tue, 21 Sep 2010)
Log Message:
-----------
removing debugging code
Modified Paths:
--------------
trunk/extensions/CentralNotice/CentralNotice.php
trunk/extensions/CentralNotice/SpecialBannerListLoader.php
trunk/extensions/CentralNotice/SpecialCentralNotice.php
Modified: trunk/extensions/CentralNotice/CentralNotice.php
===================================================================
--- trunk/extensions/CentralNotice/CentralNotice.php 2010-09-21 01:59:17 UTC
(rev 73438)
+++ trunk/extensions/CentralNotice/CentralNotice.php 2010-09-21 02:33:24 UTC
(rev 73439)
@@ -51,8 +51,6 @@
// smallish if you will. :)
$wgNoticeServerTimeout = 0;
-$cnDebug = '';
-
// Source for live counter information
$wgNoticeCounterSource = "http://donate.wikimedia.org/counter.php";
Modified: trunk/extensions/CentralNotice/SpecialBannerListLoader.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialBannerListLoader.php 2010-09-21
01:59:17 UTC (rev 73438)
+++ trunk/extensions/CentralNotice/SpecialBannerListLoader.php 2010-09-21
02:33:24 UTC (rev 73439)
@@ -64,11 +64,9 @@
* 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
@@ -78,7 +76,6 @@
// Pull banners
$templates =
CentralNoticeDB::selectTemplatesAssigned( $notices );
}
- $cnDebug .= ' 1';
}
if ( !$templates && $this->project == 'wikipedia' ) {
@@ -89,16 +86,14 @@
// 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 ) . $cnDebug;
+ return FormatJson::encode( $templates );
}
}
Modified: trunk/extensions/CentralNotice/SpecialCentralNotice.php
===================================================================
--- trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-09-21
01:59:17 UTC (rev 73438)
+++ trunk/extensions/CentralNotice/SpecialCentralNotice.php 2010-09-21
02:33:24 UTC (rev 73439)
@@ -1005,14 +1005,10 @@
* @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() );
- $cnDebug .= ' project:'.$project.' language:'.$language.'
location:'.$location.' timestamp:'.$encTimestamp.' ';
-
// Pull non-geotargeted campaigns
$campaignResults1 = $dbr->select(
array(
@@ -1069,7 +1065,6 @@
$campaigns[] = $row->not_id;
}
}
- $cnDebug .= ' campaigns: '.count( $campaigns ).' database:
'.$wgDBname;
$templates = array();
if ( $campaigns ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs