]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/Database.php
API: We can now post to groups via the Mastodon endpoint
[friendica.git] / src / Database / Database.php
index 885ece99fa2eae337b4f04927a1ee184c670e215..88d8d7d0f6ef87baa78cbc7f63dcd2cceeb65c15 100644 (file)
@@ -136,11 +136,11 @@ class Database
                                $connect .= ";charset=" . $charset;
                        }
 
-               if ($socket) {
-                       $connect .= ";$unix_socket=" . $socket;
-               }
+                       if ($socket) {
+                               $connect .= ";$unix_socket=" . $socket;
+                       }
 
-               try {
+                       try {
                                $this->connection = @new PDO($connect, $user, $pass, [PDO::ATTR_PERSISTENT => $persistent]);
                                $this->connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, $this->pdo_emulate_prepares);
                                $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
@@ -165,10 +165,10 @@ class Database
                                if ($charset) {
                                        $this->connection->set_charset($charset);
                                }
-                                
-                                if ($socket) {
-                                        $this->connection->set_socket($socket);
-                                }
+
+                               if ($socket) {
+                                       $this->connection->set_socket($socket);
+                               }
 
                        }
                }