Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Support host:/path/to/socket file in sql driver configuration. Fix #1160
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Oct 3, 2016
1 parent 0b3477b commit c8331e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/core/src/pydio/Core/Utils/Vars/OptionsHelper.php
Expand Up @@ -236,6 +236,13 @@ public static function cleanDibiDriverParameters($params)
$params["formatDate"] = "'Y-m-d'";
break;
}
if(strpos($params['host'], ':') !== false){
list($h, $portOrSocket) = explode(":", $params['host']);
if(!is_numeric($portOrSocket) && file_exists($portOrSocket)){
$params['host'] = $h;
$params['socket'] = $portOrSocket;
}
}
if (isSet($value)) {
self::$_dibiParamClean[$value] = $params;
}
Expand Down

0 comments on commit c8331e0

Please sign in to comment.