Skip to content
Snippets Groups Projects
Commit c5e33f51 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #9067 from owncloud/pass-db-hostname

Obviously have to pass the hostname as is when there is no ':' in the hostname
parents a548de36 9db0a82a
No related branches found
No related tags found
No related merge requests found
...@@ -78,12 +78,12 @@ class OC_DB { ...@@ -78,12 +78,12 @@ class OC_DB {
// Host variable may carry a port or socket. // Host variable may carry a port or socket.
list($host, $portOrSocket) = explode(':', $host, 2); list($host, $portOrSocket) = explode(':', $host, 2);
if (ctype_digit($portOrSocket)) { if (ctype_digit($portOrSocket)) {
$connectionParams['host'] = $host;
$connectionParams['port'] = $portOrSocket; $connectionParams['port'] = $portOrSocket;
} else { } else {
$connectionParams['unix_socket'] = $portOrSocket; $connectionParams['unix_socket'] = $portOrSocket;
} }
} }
$connectionParams['host'] = $host;
$connectionParams['dbname'] = $name; $connectionParams['dbname'] = $name;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment