@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | define('INSTALL', false); |
| 11 | 11 | define('IN_ADMIN', true); |
| 12 | 12 | |
| 13 | -require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
|
| 13 | +require('../common.'.substr(strrchr(__FILE__, '.'), 1)); |
|
| 14 | 14 | |
| 15 | 15 | if ($user['authlevel'] < 3) { |
| 16 | 16 | AdminMessage(classLocale::$lang['adm_err_denied']); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | foreach ($value as $interval_data) { |
| 112 | 112 | print("<tr>"); |
| 113 | 113 | print("<td>{$user_id}</td><td>{$user_record['username']}</td><td>{$interval_data[0]}</td><td>{$interval_data[1]}</td><td>{$interval_data[2]}</td>"); |
| 114 | - print("<td>" . date(FMT_DATE_TIME_SQL, $user_record['onlinetime']) . "</td>"); |
|
| 114 | + print("<td>".date(FMT_DATE_TIME_SQL, $user_record['onlinetime'])."</td>"); |
|
| 115 | 115 | print("</tr>"); |
| 116 | 116 | } |
| 117 | 117 | } |
@@ -243,9 +243,9 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | protected function compileFrom() { |
| 246 | - $this->_compiledQuery[] = 'FROM `{{' . $this->stringEscape($this->table) . '}}`'; |
|
| 246 | + $this->_compiledQuery[] = 'FROM `{{'.$this->stringEscape($this->table).'}}`'; |
|
| 247 | 247 | if (!empty($this->alias)) { |
| 248 | - $this->_compiledQuery[] = 'AS `' . $this->stringEscape($this->alias) . '`'; |
|
| 248 | + $this->_compiledQuery[] = 'AS `'.$this->stringEscape($this->alias).'`'; |
|
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | |
@@ -254,28 +254,28 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | protected function compileWhere() { |
| 256 | 256 | // TODO - fields should be escaped !! |
| 257 | - !empty($this->where) ? $this->_compiledQuery[] = 'WHERE ' . implode(' AND ', $this->where) : false; |
|
| 257 | + !empty($this->where) ? $this->_compiledQuery[] = 'WHERE '.implode(' AND ', $this->where) : false; |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | protected function compileGroupBy() { |
| 261 | 261 | // TODO - fields should be escaped !! |
| 262 | - !empty($this->groupBy) ? $this->_compiledQuery[] = 'GROUP BY ' . implode(',', $this->arrayEscape($this->groupBy)) : false; |
|
| 262 | + !empty($this->groupBy) ? $this->_compiledQuery[] = 'GROUP BY '.implode(',', $this->arrayEscape($this->groupBy)) : false; |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | protected function compileOrderBy() { |
| 266 | 266 | // TODO - fields should be escaped !! |
| 267 | - !empty($this->orderBy) ? $this->_compiledQuery[] = 'ORDER BY ' . implode(',', $this->arrayEscape($this->orderBy)) : false; |
|
| 267 | + !empty($this->orderBy) ? $this->_compiledQuery[] = 'ORDER BY '.implode(',', $this->arrayEscape($this->orderBy)) : false; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | protected function compileHaving() { |
| 271 | 271 | // TODO - fields should be escaped !! |
| 272 | - !empty($this->having) ? $this->_compiledQuery[] = 'HAVING ' . implode(' AND ', $this->having) : false; |
|
| 272 | + !empty($this->having) ? $this->_compiledQuery[] = 'HAVING '.implode(' AND ', $this->having) : false; |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | protected function compileLimit() { |
| 276 | 276 | // TODO - fields should be escaped !! |
| 277 | 277 | if ($limit = $this->fetchOne ? 1 : $this->limit) { |
| 278 | - $this->_compiledQuery[] = 'LIMIT ' . $limit . (!empty($this->offset) ? ' OFFSET ' . $this->offset : ''); |
|
| 278 | + $this->_compiledQuery[] = 'LIMIT '.$limit.(!empty($this->offset) ? ' OFFSET '.$this->offset : ''); |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | * @return string |
| 350 | 350 | */ |
| 351 | 351 | protected function processFieldString($fieldName) { |
| 352 | - $result = (string)$fieldName; |
|
| 352 | + $result = (string) $fieldName; |
|
| 353 | 353 | if ( |
| 354 | 354 | $result != '' |
| 355 | 355 | && |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | !($fieldName instanceof DbSqlLiteral) |
| 358 | 358 | ) { |
| 359 | 359 | // Other should be formatted |
| 360 | - $result = '`' . $this->stringEscape($result) . '`'; |
|
| 360 | + $result = '`'.$this->stringEscape($result).'`'; |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | return $result; |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | */ |
| 371 | 371 | protected function processField($fieldName) { |
| 372 | 372 | if (is_bool($fieldName)) { |
| 373 | - $result = (string)intval($fieldName); |
|
| 373 | + $result = (string) intval($fieldName); |
|
| 374 | 374 | } elseif (is_numeric($fieldName)) { |
| 375 | 375 | $result = $fieldName; |
| 376 | 376 | } elseif (is_null($fieldName)) { |
@@ -41,10 +41,10 @@ |
||
| 41 | 41 | $alias = $this->makeAliasFromField($functionName, $field); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - $this->literal = strtoupper($functionName) . '(' . $this->makeFieldFromString($field) . ')'; |
|
| 44 | + $this->literal = strtoupper($functionName).'('.$this->makeFieldFromString($field).')'; |
|
| 45 | 45 | |
| 46 | 46 | if ($alias) { |
| 47 | - $this->literal .= ' AS `' . $alias . '`'; |
|
| 47 | + $this->literal .= ' AS `'.$alias.'`'; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | return $this; |
@@ -45,8 +45,8 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | protected function quoteStringAsFieldByRef(&$string) { |
| 47 | 47 | $string = $this->stringEscape($string); |
| 48 | - if ((string)$string && '*' != $string) { |
|
| 49 | - $string = '`' . $string . '`'; |
|
| 48 | + if ((string) $string && '*' != $string) { |
|
| 49 | + $string = '`'.$string.'`'; |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |