r73439 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73438‎ | r73439 | r73440 >
Date:02:33, 21 September 2010
Author:kaldari
Status:ok
Tags:
Comment:
removing debugging code
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialBannerListLoader.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialBannerListLoader.php
@@ -64,11 +64,9 @@
6565 * Generate JSON for the specified site
6666 */
6767 function getJsonList() {
68 - global $cnDebug;
6968
7069 // Quick short circuit to be able to show preferred notices
7170 $templates = array();
72 - $cnDebug = ' //';
7371
7472 if ( $this->language == 'en' && $this->project != null ) {
7573 // See if we have any preferred notices for all of en
@@ -78,7 +76,6 @@
7977 // Pull banners
8078 $templates = CentralNoticeDB::selectTemplatesAssigned( $notices );
8179 }
82 - $cnDebug .= ' 1';
8380 }
8481
8582 if ( !$templates && $this->project == 'wikipedia' ) {
@@ -89,16 +86,14 @@
9087 // Pull banners
9188 $templates = CentralNoticeDB::selectTemplatesAssigned( $notices );
9289 }
93 - $cnDebug .= ' 2';
9490 }
9591
9692 // Didn't find any preferred matches so do an old style lookup
9793 if ( !$templates ) {
9894 $templates = CentralNotice::selectNoticeTemplates( $this->project, $this->language, $this->location );
99 - $cnDebug .= ' 3';
10095 }
10196
102 - return FormatJson::encode( $templates ) . $cnDebug;
 97+ return FormatJson::encode( $templates );
10398 }
10499
105100 }
Index: trunk/extensions/CentralNotice/CentralNotice.php
@@ -51,8 +51,6 @@
5252 // smallish if you will. :)
5353 $wgNoticeServerTimeout = 0;
5454
55 -$cnDebug = '';
56 -
5755 // Source for live counter information
5856 $wgNoticeCounterSource = "http://donate.wikimedia.org/counter.php";
5957
Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -1005,14 +1005,10 @@
10061006 * @return A 2D array of running banners with associated weights and settings
10071007 */
10081008 static function selectNoticeTemplates( $project, $language, $location = null ) {
1009 - global $cnDebug, $wgDBname;
1010 -
10111009 $campaigns = array();
10121010 $dbr = wfGetDB( DB_SLAVE );
10131011 $encTimestamp = $dbr->addQuotes( $dbr->timestamp() );
10141012
1015 - $cnDebug .= ' project:'.$project.' language:'.$language.' location:'.$location.' timestamp:'.$encTimestamp.' ';
1016 -
10171013 // Pull non-geotargeted campaigns
10181014 $campaignResults1 = $dbr->select(
10191015 array(
@@ -1069,7 +1065,6 @@
10701066 $campaigns[] = $row->not_id;
10711067 }
10721068 }
1073 - $cnDebug .= ' campaigns: '.count( $campaigns ).' database: '.$wgDBname;
10741069
10751070 $templates = array();
10761071 if ( $campaigns ) {

Status & tagging log