Rename variable to indicate that it can be port and socket.

remotes/origin/ldap_group_count
Andreas Fischer 11 years ago
parent 3d8eabedbd
commit 0932760304
  1. 8
      lib/private/db.php

@ -76,11 +76,11 @@ class OC_DB {
$host = OC_Config::getValue('dbhost', '');
if (strpos($host, ':')) {
// Host variable may carry a port or socket.
list($host, $socket) = explode(':', $host, 2);
if (ctype_digit($socket)) {
$connectionParams['port'] = $socket;
list($host, $portOrSocket) = explode(':', $host, 2);
if (ctype_digit($portOrSocket)) {
$connectionParams['port'] = $portOrSocket;
} else {
$connectionParams['unix_socket'] = $socket;
$connectionParams['unix_socket'] = $portOrSocket;
}
}
$connectionParams['host'] = $host;

Loading…
Cancel
Save