Index: trunk/extensions/MetricsReporting/MetricsMaintenance.php |
— | — | @@ -14,14 +14,15 @@ |
15 | 15 | */ |
16 | 16 | protected function getDB() { |
17 | 17 | if ( is_null( $this->db ) ) { |
18 | | - global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser, $wgMetricsDBpassword, $wgMetricsDBtype; |
| 18 | + global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser, |
| 19 | + $wgMetricsDBpassword, $wgMetricsDBtype, $wgMetricsDBprefix; |
19 | 20 | $this->db = DatabaseBase::factory( $wgMetricsDBtype, |
20 | 21 | array( |
21 | 22 | 'host' => $wgMetricsDBserver, |
22 | 23 | 'user' => $wgMetricsDBuser, |
23 | 24 | 'password' => $wgMetricsDBpassword, |
24 | 25 | 'dbname' => $wgMetricsDBname, |
25 | | - 'tablePrefix' => '', |
| 26 | + 'tablePrefix' => $wgMetricsDBprefix, |
26 | 27 | ) |
27 | 28 | ); |
28 | 29 | //$this->db->query( "SET names utf8" ); |
Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php |
— | — | @@ -19,14 +19,15 @@ |
20 | 20 | */ |
21 | 21 | protected function getDB() { |
22 | 22 | if ( is_null( $this->mDb ) ) { |
23 | | - global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser, $wgMetricsDBpassword, $wgMetricsDBtype; |
| 23 | + global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser, |
| 24 | + $wgMetricsDBpassword, $wgMetricsDBtype, $wgMetricsDBprefix; |
24 | 25 | $this->mDb = DatabaseBase::factory( $wgMetricsDBtype, |
25 | 26 | array( |
26 | 27 | 'host' => $wgMetricsDBserver, |
27 | 28 | 'user' => $wgMetricsDBuser, |
28 | 29 | 'password' => $wgMetricsDBpassword, |
29 | 30 | 'dbname' => $wgMetricsDBname, |
30 | | - 'tablePrefix' => '', |
| 31 | + 'tablePrefix' => $wgMetricsDBprefix, |
31 | 32 | ) |
32 | 33 | ); |
33 | 34 | //$this->mDb->query( "SET names utf8" ); |
Index: trunk/extensions/MetricsReporting/MetricsReporting.php |
— | — | @@ -18,11 +18,11 @@ |
19 | 19 | $wgMetricAPIModules = array(); |
20 | 20 | |
21 | 21 | $wgMetricsDBserver = ''; |
22 | | -//$wgMetricsDBport = 5432; |
23 | 22 | $wgMetricsDBname = ''; |
24 | 23 | $wgMetricsDBuser = ''; |
25 | 24 | $wgMetricsDBpassword = ''; |
26 | 25 | $wgMetricsDBtype = 'mysql'; |
| 26 | +$wgMetricsDBprefix = ''; |
27 | 27 | |
28 | 28 | $dir = dirname( __FILE__ ) . '/'; |
29 | 29 | |