]> source.dussan.org Git - nextcloud-server.git/commitdiff
Rename variable to indicate that it can be port and socket.
authorAndreas Fischer <bantu@owncloud.com>
Thu, 12 Jun 2014 18:18:38 +0000 (20:18 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Thu, 12 Jun 2014 18:18:38 +0000 (20:18 +0200)
lib/private/db.php

index e911abd5f8b6b7d1953f67b80aa87c22a5324d8e..bc9137fefd379d63d3da947f9acc491e671af8e5 100644 (file)
@@ -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;