@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * @return array|null |
| 86 | 86 | */ |
| 87 | 87 | public static function getRecordById($recordId, $fieldList = '*', $forUpdate = false) { |
| 88 | - return static::getRecord(array(static::$_idField . '=' . $recordId), $fieldList, $forUpdate); |
|
| 88 | + return static::getRecord(array(static::$_idField.'='.$recordId), $fieldList, $forUpdate); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $query = static::execute( |
| 123 | 123 | static::buildSelect() |
| 124 | 124 | ->fields(static::$_idField) |
| 125 | - ->where(array("`" . static::$_idField . "` IN (" . implode(',', $idList) . ")")) |
|
| 125 | + ->where(array("`".static::$_idField."` IN (".implode(',', $idList).")")) |
|
| 126 | 126 | ); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | protected static function prepareFetchValue($sqlQuery, $values = array()) { |
| 196 | 196 | $result = static::prepareFetchOne($sqlQuery, $values); |
| 197 | - if(empty($result) || !array($result)) { |
|
| 197 | + if (empty($result) || !array($result)) { |
|
| 198 | 198 | $result = null; |
| 199 | 199 | } else { |
| 200 | 200 | $result = array_pop($result); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | static::buildSelect() |
| 55 | 55 | ->fields('id') |
| 56 | 56 | ->where(array( |
| 57 | - "`user_as_ally` IS NULL AND `user_bot` = " . USER_BOT_PLAYER . " FOR UPDATE;" |
|
| 57 | + "`user_as_ally` IS NULL AND `user_bot` = ".USER_BOT_PLAYER." FOR UPDATE;" |
|
| 58 | 58 | )) |
| 59 | 59 | ); |
| 60 | 60 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | // ); |
| 70 | 70 | |
| 71 | 71 | return static::prepareExecute( |
| 72 | - "SELECT 1 FROM {{users}} WHERE `id` = :userId" . |
|
| 72 | + "SELECT 1 FROM {{users}} WHERE `id` = :userId". |
|
| 73 | 73 | (!empty($planet['id_owner']) ? ' OR `id` = :planetOwnerId' : ''), |
| 74 | 74 | array( |
| 75 | 75 | ':userId' => idval($user['id']), |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | public static function db_user_count($online = false) { |
| 82 | 82 | return static::prepareFetchValue( |
| 83 | - 'SELECT COUNT(id) AS user_count FROM `{{users}}` WHERE user_as_ally IS NULL' . |
|
| 83 | + 'SELECT COUNT(id) AS user_count FROM `{{users}}` WHERE user_as_ally IS NULL'. |
|
| 84 | 84 | ($online ? ' AND onlinetime > :onlineTime' : ''), |
| 85 | 85 | array( |
| 86 | 86 | ':onlineTime' => SN_TIME_NOW - classSupernova::$config->game_users_online_timeout, |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | LEFT JOIN |
| 98 | 98 | {{referrals}} as r on r.id_partner = u.id |
| 99 | 99 | WHERE " . |
| 100 | - ($online ? "`onlinetime` >= :onlineTime" : 'user_as_ally IS NULL') . |
|
| 100 | + ($online ? "`onlinetime` >= :onlineTime" : 'user_as_ally IS NULL'). |
|
| 101 | 101 | " GROUP BY u.id |
| 102 | 102 | ORDER BY user_as_ally, {$sort} ASC", |
| 103 | 103 | array( |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | public static function db_user_list_set_mass_mail(&$owners_list, $set) { |
| 185 | - return classSupernova::db_upd_record_list(LOC_USER, !empty($owners_list) ? '`id` IN (' . implode(',', $owners_list) . ');' : '', $set); |
|
| 185 | + return classSupernova::db_upd_record_list(LOC_USER, !empty($owners_list) ? '`id` IN ('.implode(',', $owners_list).');' : '', $set); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | public static function db_user_list_set_by_ally_and_rank($ally_id, $ally_rank_id, $set) { |