Index: trunk/extensions/CentralNotice/special/SpecialBannerAllocation.php |
— | — | @@ -181,13 +181,13 @@ |
182 | 182 | } |
183 | 183 | |
184 | 184 | if ( $banner['campaign'] ) { |
185 | | - $campaigns[] = "'".$banner['campaign']."'"; |
| 185 | + $campaigns[] = $banner['campaign']; |
186 | 186 | } |
187 | 187 | } |
188 | 188 | |
189 | 189 | // Build campaign list for bannerstats.js |
190 | | - $campaignList = implode( ', ', $campaigns ); |
191 | | - $js = "wgCentralNoticeAllocationCampaigns = array( $campaignList );"; |
| 190 | + $campaignList = json_encode( $campaigns ); |
| 191 | + $js = "wgCentralNoticeAllocationCampaigns = $campaignList;"; |
192 | 192 | $htmlOut .= Html::inlineScript( $js ); |
193 | 193 | |
194 | 194 | if ( $anonBanners && $anonWeight > 0 ) { |
Index: trunk/extensions/CentralNotice/bannerstats.js |
— | — | @@ -3,6 +3,7 @@ |
4 | 4 | * wgCentralNoticeAllocationCampaigns. It then adds the rates to the allocation tables. |
5 | 5 | */ |
6 | 6 | $( document ).ready( function () { |
| 7 | + /* |
7 | 8 | $.each( wgCentralNoticeAllocationCampaigns, function( index, campaignName ) { |
8 | 9 | var statUrl = 'http://fundraising-analytics.wikimedia.org/live_stats/' + campaignName; |
9 | 10 | $.ajax( { |
— | — | @@ -20,4 +21,5 @@ |
21 | 22 | } |
22 | 23 | } ); |
23 | 24 | } ) |
| 25 | + */ |
24 | 26 | } ); |