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

Commit c8331e0

Browse files
committed
Support host:/path/to/socket file in sql driver configuration. Fix #1160
1 parent 0b3477b commit c8331e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/src/core/src/pydio/Core/Utils/Vars/OptionsHelper.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,13 @@ public static function cleanDibiDriverParameters($params)
236236
$params["formatDate"] = "'Y-m-d'";
237237
break;
238238
}
239+
if(strpos($params['host'], ':') !== false){
240+
list($h, $portOrSocket) = explode(":", $params['host']);
241+
if(!is_numeric($portOrSocket) && file_exists($portOrSocket)){
242+
$params['host'] = $h;
243+
$params['socket'] = $portOrSocket;
244+
}
245+
}
239246
if (isSet($value)) {
240247
self::$_dibiParamClean[$value] = $params;
241248
}

0 commit comments

Comments
 (0)