Permalink
Browse files

Support host:/path/to/socket file in sql driver configuration. Fix #1160

  • Loading branch information...
1 parent 0b3477b commit c8331e0d67a712d87cc270073519040834a6064a @cdujeu cdujeu committed Oct 3, 2016
Showing with 7 additions and 0 deletions.
  1. +7 −0 core/src/core/src/pydio/Core/Utils/Vars/OptionsHelper.php
@@ -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;
}

0 comments on commit c8331e0

Please sign in to comment.