Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialBannerListLoader.php |
— | — | @@ -64,11 +64,9 @@ |
65 | 65 | * Generate JSON for the specified site |
66 | 66 | */ |
67 | 67 | function getJsonList() { |
68 | | - global $cnDebug; |
69 | 68 | |
70 | 69 | // Quick short circuit to be able to show preferred notices |
71 | 70 | $templates = array(); |
72 | | - $cnDebug = ' //'; |
73 | 71 | |
74 | 72 | if ( $this->language == 'en' && $this->project != null ) { |
75 | 73 | // See if we have any preferred notices for all of en |
— | — | @@ -78,7 +76,6 @@ |
79 | 77 | // Pull banners |
80 | 78 | $templates = CentralNoticeDB::selectTemplatesAssigned( $notices ); |
81 | 79 | } |
82 | | - $cnDebug .= ' 1'; |
83 | 80 | } |
84 | 81 | |
85 | 82 | if ( !$templates && $this->project == 'wikipedia' ) { |
— | — | @@ -89,16 +86,14 @@ |
90 | 87 | // Pull banners |
91 | 88 | $templates = CentralNoticeDB::selectTemplatesAssigned( $notices ); |
92 | 89 | } |
93 | | - $cnDebug .= ' 2'; |
94 | 90 | } |
95 | 91 | |
96 | 92 | // Didn't find any preferred matches so do an old style lookup |
97 | 93 | if ( !$templates ) { |
98 | 94 | $templates = CentralNotice::selectNoticeTemplates( $this->project, $this->language, $this->location ); |
99 | | - $cnDebug .= ' 3'; |
100 | 95 | } |
101 | 96 | |
102 | | - return FormatJson::encode( $templates ) . $cnDebug; |
| 97 | + return FormatJson::encode( $templates ); |
103 | 98 | } |
104 | 99 | |
105 | 100 | } |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -51,8 +51,6 @@ |
52 | 52 | // smallish if you will. :) |
53 | 53 | $wgNoticeServerTimeout = 0; |
54 | 54 | |
55 | | -$cnDebug = ''; |
56 | | - |
57 | 55 | // Source for live counter information |
58 | 56 | $wgNoticeCounterSource = "http://donate.wikimedia.org/counter.php"; |
59 | 57 | |
Index: branches/wmf/1.16wmf4/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -1005,14 +1005,10 @@ |
1006 | 1006 | * @return A 2D array of running banners with associated weights and settings |
1007 | 1007 | */ |
1008 | 1008 | static function selectNoticeTemplates( $project, $language, $location = null ) { |
1009 | | - global $cnDebug, $wgDBname; |
1010 | | - |
1011 | 1009 | $campaigns = array(); |
1012 | 1010 | $dbr = wfGetDB( DB_SLAVE ); |
1013 | 1011 | $encTimestamp = $dbr->addQuotes( $dbr->timestamp() ); |
1014 | 1012 | |
1015 | | - $cnDebug .= ' project:'.$project.' language:'.$language.' location:'.$location.' timestamp:'.$encTimestamp.' '; |
1016 | | - |
1017 | 1013 | // Pull non-geotargeted campaigns |
1018 | 1014 | $campaignResults1 = $dbr->select( |
1019 | 1015 | array( |
— | — | @@ -1069,7 +1065,6 @@ |
1070 | 1066 | $campaigns[] = $row->not_id; |
1071 | 1067 | } |
1072 | 1068 | } |
1073 | | - $cnDebug .= ' campaigns: '.count( $campaigns ).' database: '.$wgDBname; |
1074 | 1069 | |
1075 | 1070 | $templates = array(); |
1076 | 1071 | if ( $campaigns ) { |
Property changes on: branches/wmf/1.16wmf4/extensions/CentralNotice |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1077 | 1072 | Merged /trunk/extensions/CentralNotice:r73439 |