@@ -174,8 +174,12 @@ |
||
174 | 174 | public function setLastConnection($id) |
175 | 175 | { |
176 | 176 | uksort($this->connections, function ($a, $b) use ($id) { |
177 | - if ($a === $id) return 1; |
|
178 | - if ($b === $id) return -1; |
|
177 | + if ($a === $id) { |
|
178 | + return 1; |
|
179 | + } |
|
180 | + if ($b === $id) { |
|
181 | + return -1; |
|
182 | + } |
|
179 | 183 | return 0; |
180 | 184 | }); |
181 | 185 | } |
@@ -46,9 +46,15 @@ |
||
46 | 46 | |
47 | 47 | public function connect($server = null, $username = null, $password = null, $newLink = false, $clientFlags = 0) |
48 | 48 | { |
49 | - if ($server === null) $server = ini_get("mysql.default_host"); |
|
50 | - if ($username === null) $username = ini_get("mysql.default_user"); |
|
51 | - if ($password === null) $password = ini_get("mysql.default_password"); |
|
49 | + if ($server === null) { |
|
50 | + $server = ini_get("mysql.default_host"); |
|
51 | + } |
|
52 | + if ($username === null) { |
|
53 | + $username = ini_get("mysql.default_user"); |
|
54 | + } |
|
55 | + if ($password === null) { |
|
56 | + $password = ini_get("mysql.default_password"); |
|
57 | + } |
|
52 | 58 | |
53 | 59 | // @todo: implement $newLInk and $clientFlags |
54 | 60 |