]> source.dussan.org Git - nextcloud-server.git/commitdiff
Inline $port expression, getting rid of $port variable.
authorAndreas Fischer <bantu@owncloud.com>
Thu, 12 Jun 2014 17:48:37 +0000 (19:48 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Thu, 12 Jun 2014 17:48:37 +0000 (19:48 +0200)
lib/private/db.php

index eec2b9220e24ff20dd56f6da412a13e5ba6eca77..d3bf8c0016cc6d6c69f83ae3590b55048e1048d0 100644 (file)
@@ -65,7 +65,6 @@ class OC_DB {
                $type = OC_Config::getValue( "dbtype", "sqlite" );
                if(strpos($host, ':')) {
                        list($host, $socket)=explode(':', $host, 2);
-                       $port = ctype_digit($socket) && $socket<=65535;
                } else {
                        $socket=FALSE;
                }
@@ -90,7 +89,7 @@ class OC_DB {
                                'dbname' => $name,
                        );
                        if ($socket) {
-                               if ($port) {
+                               if (ctype_digit($socket) && $socket <= 65535) {
                                        $connectionParams['port'] = $socket;
                                } else {
                                        $connectionParams['unix_socket'] = $socket;