Passed
Push — master ( 305365...ab28fd )
by Joe
07:25
created
src/Mysqli/Db.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 		if ($user == '') {
70 70
 			$user = $this->user;
71 71
 		}
72
-        if ($password == '') {
73
-            $password = $this->password;
74
-        }
75
-        if ($port == '') {
76
-            $port = $this->port;
77
-        }
72
+		if ($password == '') {
73
+			$password = $this->password;
74
+		}
75
+		if ($port == '') {
76
+			$port = $this->port;
77
+		}
78 78
 		/* establish connection, select database */
79 79
 		if (!is_object($this->linkId)) {
80 80
 			$this->connectionAttempt++;
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 			}
88 88
 			$this->linkId = mysqli_init();
89 89
 			$this->linkId->options(MYSQLI_INIT_COMMAND, "SET NAMES {$this->characterSet} COLLATE {$this->collation}, COLLATION_CONNECTION = {$this->collation}, COLLATION_DATABASE = {$this->collation}");
90
-            if ($port != '') {
91
-                $this->linkId->real_connect($host, $user, $password, $database, $port);
92
-            } else {
93
-                $this->linkId->real_connect($host, $user, $password, $database);
94
-            }			
90
+			if ($port != '') {
91
+				$this->linkId->real_connect($host, $user, $password, $database, $port);
92
+			} else {
93
+				$this->linkId->real_connect($host, $user, $password, $database);
94
+			}			
95 95
 			$this->linkId->set_charset($this->characterSet);
96 96
 			if ($this->linkId->connect_errno) {
97 97
 				$this->halt("connect($host, $user, \$password) failed. ".$mysqli->connect_error);
@@ -247,20 +247,20 @@  discard block
 block discarded – undo
247 247
 			}
248 248
 			$start = microtime(true);
249 249
 			if (false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) {
250
-                if (@mysqli_errno($this->linkId) == 3101) {
251
-                    myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error, Trying Again in 1 second', __LINE__, __FILE__);
252
-                    sleep(1);
253
-                    if (false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) {
254
-                        if (@mysqli_errno($this->linkId) == 3101) {
255
-                            myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error, Trying Again in 1 second', __LINE__, __FILE__);
256
-                            sleep(1);
257
-                            if (false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) {
258
-                                myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error, Giving Up', __LINE__, __FILE__);
259
-                            }
260
-                        }
261
-                    }
262
-                }
263
-            }
250
+				if (@mysqli_errno($this->linkId) == 3101) {
251
+					myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error, Trying Again in 1 second', __LINE__, __FILE__);
252
+					sleep(1);
253
+					if (false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) {
254
+						if (@mysqli_errno($this->linkId) == 3101) {
255
+							myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error, Trying Again in 1 second', __LINE__, __FILE__);
256
+							sleep(1);
257
+							if (false === $this->queryId = @mysqli_query($this->linkId, $queryString, MYSQLI_STORE_RESULT)) {
258
+								myadmin_log('myadmin', 'error', 'Got MySQLi 3101 Rollback Error, Giving Up', __LINE__, __FILE__);
259
+							}
260
+						}
261
+					}
262
+				}
263
+			}
264 264
  			$this->addLog($queryString, microtime(true) - $start, $line, $file);
265 265
 			$this->Row = 0;
266 266
 			$this->Errno = @mysqli_errno($this->linkId);
Please login to merge, or discard this patch.