r94515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94514‎ | r94515 | r94516 >
Date:13:57, 15 August 2011
Author:reedy
Status:deferred
Tags:
Comment:
Add $wgMetricsDBprefix for completeness
Modified paths:
  • /trunk/extensions/MetricsReporting/ApiAnalyticsBase.php (modified) (history)
  • /trunk/extensions/MetricsReporting/MetricsMaintenance.php (modified) (history)
  • /trunk/extensions/MetricsReporting/MetricsReporting.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetricsReporting/MetricsMaintenance.php
@@ -14,14 +14,15 @@
1515 */
1616 protected function getDB() {
1717 if ( is_null( $this->db ) ) {
18 - global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser, $wgMetricsDBpassword, $wgMetricsDBtype;
 18+ global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser,
 19+ $wgMetricsDBpassword, $wgMetricsDBtype, $wgMetricsDBprefix;
1920 $this->db = DatabaseBase::factory( $wgMetricsDBtype,
2021 array(
2122 'host' => $wgMetricsDBserver,
2223 'user' => $wgMetricsDBuser,
2324 'password' => $wgMetricsDBpassword,
2425 'dbname' => $wgMetricsDBname,
25 - 'tablePrefix' => '',
 26+ 'tablePrefix' => $wgMetricsDBprefix,
2627 )
2728 );
2829 //$this->db->query( "SET names utf8" );
Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php
@@ -19,14 +19,15 @@
2020 */
2121 protected function getDB() {
2222 if ( is_null( $this->mDb ) ) {
23 - global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser, $wgMetricsDBpassword, $wgMetricsDBtype;
 23+ global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser,
 24+ $wgMetricsDBpassword, $wgMetricsDBtype, $wgMetricsDBprefix;
2425 $this->mDb = DatabaseBase::factory( $wgMetricsDBtype,
2526 array(
2627 'host' => $wgMetricsDBserver,
2728 'user' => $wgMetricsDBuser,
2829 'password' => $wgMetricsDBpassword,
2930 'dbname' => $wgMetricsDBname,
30 - 'tablePrefix' => '',
 31+ 'tablePrefix' => $wgMetricsDBprefix,
3132 )
3233 );
3334 //$this->mDb->query( "SET names utf8" );
Index: trunk/extensions/MetricsReporting/MetricsReporting.php
@@ -18,11 +18,11 @@
1919 $wgMetricAPIModules = array();
2020
2121 $wgMetricsDBserver = '';
22 -//$wgMetricsDBport = 5432;
2322 $wgMetricsDBname = '';
2423 $wgMetricsDBuser = '';
2524 $wgMetricsDBpassword = '';
2625 $wgMetricsDBtype = 'mysql';
 26+$wgMetricsDBprefix = '';
2727
2828 $dir = dirname( __FILE__ ) . '/';
2929

Status & tagging log