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:
authorrobocoder <anthon.pang@gmail.com>2009-08-05 07:51:03 +0400
committerrobocoder <anthon.pang@gmail.com>2009-08-05 07:51:03 +0400
commit0115fd31821662533e9ddab3b91c2c8d50b86c6e (patch)
treed5dbec5d44fe6b9e50ddc20098ca02e10e58f0d9 /core/Tracker/Db.php
parentdf78d07993dba37cc6e9c600765af6ca0282fae2 (diff)
refs #865 - re-worked unix_socket support for Zend_Db and Tracker_Db
Installation will now accept: - host - host:port - host:/socket/path - /socket/path Connecting to the database, Piwik will look at the unix_socket setting (if set), or a socket path in the port; else fallback to traditional host:port. git-svn-id: http://dev.piwik.org/svn/trunk@1367 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Tracker/Db.php')
-rw-r--r--core/Tracker/Db.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Tracker/Db.php b/core/Tracker/Db.php
index 6fa7544183..ba179889ae 100644
--- a/core/Tracker/Db.php
+++ b/core/Tracker/Db.php
@@ -35,6 +35,10 @@ class Piwik_Tracker_Db
{
$this->dsn = $driverName.":dbname=${dbInfo['dbname']};unix_socket=${dbInfo['unix_socket']}";
}
+ else if ($dbInfo['port'][0] == '/')
+ {
+ $this->dsn = $driverName.":dbname=${dbInfo['dbname']};unix_socket=${dbInfo['port']}";
+ }
else
{
$this->dsn = $driverName.":dbname=${dbInfo['dbname']};host=${dbInfo['host']};port=${dbInfo['port']}";