Index: trunk/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -9,6 +9,8 @@ |
10 | 10 | exit( 1 ); |
11 | 11 | } |
12 | 12 | |
| 13 | +$wgContributionReportingBaseURL = "http://meta.wikimedia.org/w/index.php?title=Special:NoticeTemplate/view&template="; |
| 14 | + |
13 | 15 | // Override these with appropriate DB settings for the CiviCRM database... |
14 | 16 | $wgContributionReportingDBserver = $wgDBserver; |
15 | 17 | $wgContributionReportingDBuser = $wgDBuser; |
Index: trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php |
— | — | @@ -11,13 +11,6 @@ |
12 | 12 | |
13 | 13 | public static $number_of_days_to_show = 7; |
14 | 14 | |
15 | | - //URL for templates |
16 | | - public static $templateURLs = array( |
17 | | - '2009_Notice1' => "http://meta.wikimedia.org/w/index.php?title=Special:NoticeTemplate/view&template=2009_Notice1", |
18 | | - '2009_EM1Notice'=> "http://meta.wikimedia.org/w/index.php?title=Special:NoticeTemplate/view&template=2009_EM1Notice", |
19 | | - '2009_Notice11' => "http://meta.wikimedia.org/w/index.php?title=Special:NoticeTemplate/view&template=2009_Notice11", |
20 | | - '2009_Notice10' => "http://meta.wikimedia.org/w/index.php?title=Special:NoticeTemplate/view&template=2009_Notice10", |
21 | | - ); |
22 | 15 | /* Functions */ |
23 | 16 | |
24 | 17 | public function __construct() { |
— | — | @@ -62,7 +55,7 @@ |
63 | 56 | // Html out for the days total |
64 | 57 | public function showDayTotals( $is_now = true, $timestamp = 0 ) { |
65 | 58 | global $wgOut,$wgLang; |
66 | | - global $wgAllowedTemplates, $wgAllowedSupport, $wgAllowedPaymentMethod; |
| 59 | + global $wgAllowedTemplates, $wgAllowedSupport, $wgAllowedPaymentMethod, $wgContributionReportingBaseURL; |
67 | 60 | |
68 | 61 | $totals = $this->getDayTotals($is_now, $timestamp); |
69 | 62 | |
— | — | @@ -110,14 +103,9 @@ |
111 | 104 | $conversion_rate = ( $template[1] == 0 ) ? 0 : ( $template[2] / $template[1] ) * 100; |
112 | 105 | $amount = ( $template[3] == 0 ) ? 0 : $template[3]; |
113 | 106 | |
114 | | - //if the template has a URL associated, create a href to it |
115 | | - $template_link = $expanded_template[0]; |
116 | | - if(isset(SpecialContributionTrackingStatistics::$templateURLs["{$expanded_template[0]}"])){ |
117 | | - $link = SpecialContributionTrackingStatistics::$templateURLs["{$expanded_template[0]}"]; |
118 | | - $template_link = Xml::element('a', array('href' =>"$link"), $expanded_template[0]); |
119 | | - } |
| 107 | + $link = $wgContributionReportingBaseURL.$expanded_template[0]; |
| 108 | + $template_link = Xml::element('a', array('href' =>"$link"), $expanded_template[0]); |
120 | 109 | |
121 | | - |
122 | 110 | //average donations |
123 | 111 | $average = 0; |
124 | 112 | if($template[2] != 0){ |