Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php |
— | — | @@ -20,7 +20,8 @@ |
21 | 21 | protected function getDB() { |
22 | 22 | if ( is_null( $this->mDb ) ) { |
23 | 23 | global $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser, |
24 | | - $wgMetricsDBpassword, $wgMetricsDBtype, $wgMetricsDBprefix; |
| 24 | + $wgMetricsDBpassword, $wgMetricsDBtype, $wgMetricsDBprefix, |
| 25 | + $wgDebugDumpSql; |
25 | 26 | $this->mDb = DatabaseBase::factory( $wgMetricsDBtype, |
26 | 27 | array( |
27 | 28 | 'host' => $wgMetricsDBserver, |
— | — | @@ -28,6 +29,7 @@ |
29 | 30 | 'password' => $wgMetricsDBpassword, |
30 | 31 | 'dbname' => $wgMetricsDBname, |
31 | 32 | 'tablePrefix' => $wgMetricsDBprefix, |
| 33 | + 'flags' => ( $wgDebugDumpSql ? DBO_DEBUG : 0 ) | DBO_DEFAULT |
32 | 34 | ) |
33 | 35 | ); |
34 | 36 | //$this->mDb->query( "SET names utf8" ); |