Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2008-06-11 04:31:03 +0400
committermattpiwik <matthieu.aubry@gmail.com>2008-06-11 04:31:03 +0400
commitdee8b8170fba3e495444719c839f98ab4f4a2f6c (patch)
tree3fcab87777d7f75ca09e82aaefa4c002d3d65c0a /modules
parent863ab04d838375b4b5ab0015fc131a83665357eb (diff)
- fixes #205 you can now install with a mysql port non 3306 by specifying your.host:4455
git-svn-id: http://dev.piwik.org/svn/trunk@522 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'modules')
-rw-r--r--modules/LogStats.php9
-rw-r--r--modules/LogStats/Db.php4
2 files changed, 9 insertions, 4 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();
}
diff --git a/modules/LogStats/Db.php b/modules/LogStats/Db.php
index 7637b72fdf..a84e3d5875 100644
--- a/modules/LogStats/Db.php
+++ b/modules/LogStats/Db.php
@@ -30,9 +30,9 @@ class Piwik_LogStats_Db
/**
* Builds the DB object
*/
- public function __construct( $host, $username, $password, $dbname, $driverName = 'mysql')
+ public function __construct( $host, $username, $password, $dbname, $port, $driverName = 'mysql')
{
- $this->dsn = $driverName.":dbname=$dbname;host=$host";
+ $this->dsn = $driverName.":dbname=$dbname;host=$host;port=$port";
$this->username = $username;
$this->password = $password;
}