diff options
Diffstat (limited to 'modules/LogStats.php')
-rw-r--r-- | modules/LogStats.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/LogStats.php b/modules/LogStats.php index c121fea3ef..2d084c985b 100644 --- a/modules/LogStats.php +++ b/modules/LogStats.php @@ -87,11 +87,16 @@ class Piwik_LogStats // we decode the password. Password is html encoded because it's enclosed between " double quotes $configDb['password'] = htmlspecialchars_decode($configDb['password']); + if(!isset($configDb['port'])) + { + // before 0.2.4 there is no port specified in config file + $configDb['port'] = '3306'; + } self::$db = new Piwik_LogStats_Db( $configDb['host'], $configDb['username'], $configDb['password'], - $configDb['dbname'] - ); + $configDb['dbname'], + $configDb['port'] ); self::$db->connect(); } |