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:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-19 18:13:59 +0300
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-19 18:13:59 +0300
commiteb55d2b3c5c0b067339425bfea0e15518e14bc2e (patch)
tree384f116f78422c23db41c88adafe1c9d62b4b543 /core/Tracker/Db.php
parente247e19aee27eb437c94905342c13f3d67361ae6 (diff)
Fix #614 - MySQL unix socket support
Diffstat (limited to 'core/Tracker/Db.php')
-rw-r--r--core/Tracker/Db.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php
index d0644272c6..1d57467c84 100644
--- a/core/Tracker/Db.php
+++ b/core/Tracker/Db.php
@@ -31,7 +31,14 @@ class Piwik_Tracker_Db
*/
public function __construct( $host, $username, $password, $dbname, $port, $driverName = 'mysql')
{
- $this->dsn = $driverName.":dbname=$dbname;host=$host;port=$port";
+ if($host[0] == '/')
+ {
+ $this->dsn = $driverName.":dbname=$dbname;unix_socket=$host";
+ }
+ else
+ {
+ $this->dsn = $driverName.":dbname=$dbname;host=$host;port=$port";
+ }
$this->username = $username;
$this->password = $password;
}