Rename variable to indicate that it can be port and socket.
This commit is contained in:
parent
3d8eabedbd
commit
0932760304
|
@ -76,11 +76,11 @@ class OC_DB {
|
||||||
$host = OC_Config::getValue('dbhost', '');
|
$host = OC_Config::getValue('dbhost', '');
|
||||||
if (strpos($host, ':')) {
|
if (strpos($host, ':')) {
|
||||||
// Host variable may carry a port or socket.
|
// Host variable may carry a port or socket.
|
||||||
list($host, $socket) = explode(':', $host, 2);
|
list($host, $portOrSocket) = explode(':', $host, 2);
|
||||||
if (ctype_digit($socket)) {
|
if (ctype_digit($portOrSocket)) {
|
||||||
$connectionParams['port'] = $socket;
|
$connectionParams['port'] = $portOrSocket;
|
||||||
} else {
|
} else {
|
||||||
$connectionParams['unix_socket'] = $socket;
|
$connectionParams['unix_socket'] = $portOrSocket;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$connectionParams['host'] = $host;
|
$connectionParams['host'] = $host;
|
||||||
|
|
Loading…
Reference in New Issue