@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $dSN = "$driver:dbname=$database;host=$host"; |
75 | 75 | if ($this->characterSet != '') |
76 | 76 | $dSN .= ';charset='.$this->characterSet; |
77 | - if ($this->linkId === FALSE) { |
|
77 | + if ($this->linkId === false) { |
|
78 | 78 | try { |
79 | 79 | $this->linkId = new \PDO($dSN, $user, $password); |
80 | 80 | } catch (\PDOException $e) { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | public function queryReturn($query, $line = '', $file = '') { |
136 | 136 | $this->query($query, $line, $file); |
137 | 137 | if ($this->num_rows() == 0) { |
138 | - return FALSE; |
|
138 | + return false; |
|
139 | 139 | } elseif ($this->num_rows() == 1) { |
140 | 140 | $this->next_record(MYSQL_ASSOC); |
141 | 141 | return $this->Record; |
@@ -184,12 +184,12 @@ discard block |
||
184 | 184 | /* we already complained in connect() about that. */ |
185 | 185 | } |
186 | 186 | // New query, discard previous result. |
187 | - if ($this->queryId !== FALSE) |
|
187 | + if ($this->queryId !== false) |
|
188 | 188 | $this->free(); |
189 | 189 | |
190 | 190 | if ($this->Debug) |
191 | 191 | printf("Debug: query = %s<br>\n", $queryString); |
192 | - if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== FALSE) |
|
192 | + if (isset($GLOBALS['log_queries']) && $GLOBALS['log_queries'] !== false) |
|
193 | 193 | $this->log($queryString, $line, $file); |
194 | 194 | |
195 | 195 | $this->queryId = $this->linkId->prepare($queryString); |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | $this->Rows = $this->queryId->fetchAll(); |
198 | 198 | $this->log("PDO Query $queryString (S:$success) - ".count($this->Rows).' Rows', __LINE__, __FILE__); |
199 | 199 | $this->Row = 0; |
200 | - if ($success === FALSE) { |
|
201 | - $email = "MySQL Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.print_r($this->queryId->errorInfo(), TRUE)."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id."<br>\n" : ''); |
|
200 | + if ($success === false) { |
|
201 | + $email = "MySQL Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.print_r($this->queryId->errorInfo(), true)."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ? 'User: '.$GLOBALS['tf']->session->account_id."<br>\n" : ''); |
|
202 | 202 | |
203 | 203 | $email .= '<br><br>Request Variables:<br>'; |
204 | 204 | foreach ($_REQUEST as $key => $value) |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $headers .= 'Content-type: text/html; charset=UTF-8'.PHP_EOL; |
214 | 214 | $headers .= 'From: No-Reply <[email protected]>'.PHP_EOL; |
215 | 215 | $headers .= 'X-Mailer: Trouble-Free.Net Admin Center'.PHP_EOL; |
216 | - admin_mail($subject, $email, $headers, FALSE, 'admin/sql_error.tpl'); |
|
216 | + admin_mail($subject, $email, $headers, false, 'admin/sql_error.tpl'); |
|
217 | 217 | $this->halt('Invalid SQL: '.$queryString, $line, $file); |
218 | 218 | } |
219 | 219 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | if ('' == $driver) |
45 | 45 | $driver = $this->driver; |
46 | 46 | /* establish connection, select database */ |
47 | - if ($this->linkId === FALSE) { |
|
47 | + if ($this->linkId === false) { |
|
48 | 48 | $this->linkId = NewADOConnection($driver); |
49 | 49 | $this->linkId->Connect($host, $user, $password, $database); |
50 | 50 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function queryReturn($query, $line = '', $file = '') { |
112 | 112 | $this->query($query, $line, $file); |
113 | 113 | if ($this->num_rows() == 0) { |
114 | - return FALSE; |
|
114 | + return false; |
|
115 | 115 | } elseif ($this->num_rows() == 1) { |
116 | 116 | $this->next_record(MYSQL_ASSOC); |
117 | 117 | return $this->Record; |
@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | // New query, discard previous result. |
164 | - if ($this->queryId !== FALSE) |
|
164 | + if ($this->queryId !== false) |
|
165 | 165 | $this->free(); |
166 | 166 | |
167 | 167 | if ($this->Debug) |
168 | 168 | printf("Debug: query = %s<br>\n", $queryString); |
169 | - if ($GLOBALS['log_queries'] !== FALSE) { |
|
169 | + if ($GLOBALS['log_queries'] !== false) { |
|
170 | 170 | $this->log($queryString, $line, $file); |
171 | 171 | |
172 | 172 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | try { |
175 | 175 | $this->queryId = $this->linkId->Execute($queryString); |
176 | 176 | } catch (exception $e) { |
177 | - $email = "MySQL Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.print_r($e, TRUE)."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ? |
|
177 | + $email = "MySQL Error<br>\n".'Query: '.$queryString."<br>\n".'Error #'.print_r($e, true)."<br>\n".'Line: '.$line."<br>\n".'File: '.$file."<br>\n".(isset($GLOBALS['tf']) ? |
|
178 | 178 | 'User: '.$GLOBALS['tf']->session->account_id."<br>\n" : ''); |
179 | 179 | |
180 | 180 | $email .= '<br><br>Request Variables:<br>'; |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $headers .= 'Content-type: text/html; charset=UTF-8'.PHP_EOL; |
191 | 191 | $headers .= 'From: No-Reply <[email protected]>'.PHP_EOL; |
192 | 192 | $headers .= 'X-Mailer: Trouble-Free.Net Admin Center'.PHP_EOL; |
193 | - admin_mail($subject, $email, $headers, FALSE, 'admin/sql_error.tpl'); |
|
193 | + admin_mail($subject, $email, $headers, false, 'admin/sql_error.tpl'); |
|
194 | 194 | $this->halt('Invalid SQL: '.$queryString, $line, $file); |
195 | 195 | } |
196 | 196 | $this->log("ADOdb Query $queryString (S:$success) - ".count($this->Rows).' Rows', __LINE__, __FILE__); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | * @return bool |
245 | 245 | */ |
246 | 246 | public function transactionBegin() { |
247 | - return TRUE; |
|
247 | + return true; |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | /** |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | * @return bool |
253 | 253 | */ |
254 | 254 | public function transactionCommit() { |
255 | - return TRUE; |
|
255 | + return true; |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | * @return bool |
261 | 261 | */ |
262 | 262 | public function transactionAbort() { |
263 | - return TRUE; |
|
263 | + return true; |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | /** |