@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | // Search array to get correct position |
| 587 | 587 | list($search_key, $search_value) = @each($key); |
| 588 | 588 | |
| 589 | - $key = NULL; |
|
| 589 | + $key = null; |
|
| 590 | 590 | foreach ($this->_tpldata[$blockname] as $i => $val_ary) |
| 591 | 591 | { |
| 592 | 592 | if ($val_ary[$search_key] === $search_value) |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | // key/value pair not found |
| 600 | - if ($key === NULL) |
|
| 600 | + if ($key === null) |
|
| 601 | 601 | { |
| 602 | 602 | return false; |
| 603 | 603 | } |
@@ -165,7 +165,7 @@ |
||
| 165 | 165 | if($query_add) { |
| 166 | 166 | $query_add = "IN ({$query_add})"; |
| 167 | 167 | if($message_range == 'unchecked') { |
| 168 | - $query_add = "NOT {$query_add}"; |
|
| 168 | + $query_add = "not {$query_add}"; |
|
| 169 | 169 | } |
| 170 | 170 | $query_add = " AND `message_id` {$query_add}"; |
| 171 | 171 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $this->db_saveItem(array_combine(array_keys($this->defaults), array_fill(0, count($this->defaults), null))); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function db_saveItem($item_list, $value = NULL) { |
|
| 83 | + public function db_saveItem($item_list, $value = null) { |
|
| 84 | 84 | if(empty($item_list)) { |
| 85 | 85 | return; |
| 86 | 86 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | $qry = array(); |
| 92 | 92 | foreach($item_list as $item_name => $item_value) { |
| 93 | 93 | if($item_name) { |
| 94 | - $item_value = db_escape($item_value === NULL ? $this->$item_name : $item_value); |
|
| 94 | + $item_value = db_escape($item_value === null ? $this->$item_name : $item_value); |
|
| 95 | 95 | $item_name = db_escape($item_name); |
| 96 | 96 | $qry[] = "('{$item_name}', '{$item_value}')"; |
| 97 | 97 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | // И только после взятия блокировок - меняем значения в кэше |
| 102 | 102 | foreach($item_list as $item_name => $item_value) { |
| 103 | - if($item_name && $item_value !== NULL) { |
|
| 103 | + if($item_name && $item_value !== null) { |
|
| 104 | 104 | $this->$item_name = $item_value; |
| 105 | 105 | } |
| 106 | 106 | } |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | |
| 77 | 77 | $result = array(); |
| 78 | 78 | $transaction_id = classSupernova::db_transaction_check(false) ? classSupernova::$transaction_id : classSupernova::$transaction_id++; |
| 79 | - $result[] = "tID {$transaction_id}"; |
|
| 79 | + $result[] = "tid {$transaction_id}"; |
|
| 80 | 80 | foreach($backtrace as $a_trace) { |
| 81 | 81 | if(in_array($a_trace['function'], $exclude_functions)) { |
| 82 | 82 | continue; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | public function unset_by_prefix($prefix_unset = '') { |
| 151 | 151 | static $array_clear; |
| 152 | 152 | !$array_clear ? $array_clear = function(&$v,$k,$p) { |
| 153 | - strpos($k, $p) === 0 ? $v = NULL : false; |
|
| 153 | + strpos($k, $p) === 0 ? $v = null : false; |
|
| 154 | 154 | } : false; |
| 155 | 155 | |
| 156 | 156 | switch (self::$mode) { |
@@ -196,14 +196,14 @@ discard block |
||
| 196 | 196 | $name = $this->make_element_name($args, 1); |
| 197 | 197 | |
| 198 | 198 | if(!$name) { |
| 199 | - return NULL; |
|
| 199 | + return null; |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | - if($this->$name[0] === NULL) { |
|
| 202 | + if($this->$name[0] === null) { |
|
| 203 | 203 | for($i = count($name) - 1; $i > 0; $i--) { |
| 204 | 204 | $cName = "{$name[$i]}_COUNT"; |
| 205 | 205 | $cName1 = "{$name[$i-1]}_COUNT"; |
| 206 | - if($this->$cName1 == NULL || $i == 1) { |
|
| 206 | + if($this->$cName1 == null || $i == 1) { |
|
| 207 | 207 | $this->$cName++; |
| 208 | 208 | } |
| 209 | 209 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | public function array_get() { |
| 217 | 217 | $name = $this->make_element_name(func_get_args()); |
| 218 | 218 | if(!$name) { |
| 219 | - return NULL; |
|
| 219 | + return null; |
|
| 220 | 220 | } |
| 221 | 221 | return $this->$name[0]; |
| 222 | 222 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $cName = "{$name[0]}_COUNT"; |
| 230 | 230 | $retVal = $this->$cName; |
| 231 | 231 | if(!$retVal) { |
| 232 | - $retVal = NULL; |
|
| 232 | + $retVal = null; |
|
| 233 | 233 | } |
| 234 | 234 | return $retVal; |
| 235 | 235 | } |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | $cName = "{$name[$i]}_COUNT"; |
| 247 | 247 | $cName1 = "{$name[$i-1]}_COUNT"; |
| 248 | 248 | |
| 249 | - if($i == 1 || $this->$cName1 === NULL) { |
|
| 249 | + if($i == 1 || $this->$cName1 === null) { |
|
| 250 | 250 | $this->$cName--; |
| 251 | 251 | if($this->$cName <= 0) { |
| 252 | 252 | unset($this->$cName); |
@@ -283,7 +283,7 @@ |
||
| 283 | 283 | */ |
| 284 | 284 | function sys_get_param($param_name, $default = '') |
| 285 | 285 | { |
| 286 | - return $_POST[$param_name] !== NULL ? $_POST[$param_name] : ($_GET[$param_name] !== NULL ? $_GET[$param_name] : $default); |
|
| 286 | + return $_POST[$param_name] !== null ? $_POST[$param_name] : ($_GET[$param_name] !== null ? $_GET[$param_name] : $default); |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | function sys_get_param_id($param_name, $default = 0) |
@@ -89,18 +89,18 @@ discard block |
||
| 89 | 89 | case 0: |
| 90 | 90 | $fleet['event_time'] = $fleet['fleet_start_time']; |
| 91 | 91 | $is_this_planet = ( |
| 92 | - ($planetrow['galaxy'] == $fleet['fleet_end_galaxy']) AND |
|
| 93 | - ($planetrow['system'] == $fleet['fleet_end_system']) AND |
|
| 94 | - ($planetrow['planet'] == $fleet['fleet_end_planet']) AND |
|
| 92 | + ($planetrow['galaxy'] == $fleet['fleet_end_galaxy']) and |
|
| 93 | + ($planetrow['system'] == $fleet['fleet_end_system']) and |
|
| 94 | + ($planetrow['planet'] == $fleet['fleet_end_planet']) and |
|
| 95 | 95 | ($planetrow['planet_type'] == $planet_end_type)); |
| 96 | 96 | break; |
| 97 | 97 | |
| 98 | 98 | case 1: |
| 99 | 99 | $fleet['event_time'] = $fleet['fleet_end_stay']; |
| 100 | 100 | $is_this_planet = ( |
| 101 | - ($planetrow['galaxy'] == $fleet['fleet_end_galaxy']) AND |
|
| 102 | - ($planetrow['system'] == $fleet['fleet_end_system']) AND |
|
| 103 | - ($planetrow['planet'] == $fleet['fleet_end_planet']) AND |
|
| 101 | + ($planetrow['galaxy'] == $fleet['fleet_end_galaxy']) and |
|
| 102 | + ($planetrow['system'] == $fleet['fleet_end_system']) and |
|
| 103 | + ($planetrow['planet'] == $fleet['fleet_end_planet']) and |
|
| 104 | 104 | ($planetrow['planet_type'] == $planet_end_type)); |
| 105 | 105 | break; |
| 106 | 106 | |
@@ -108,9 +108,9 @@ discard block |
||
| 108 | 108 | case 3: |
| 109 | 109 | $fleet['event_time'] = $fleet['fleet_end_time']; |
| 110 | 110 | $is_this_planet = ( |
| 111 | - ($planetrow['galaxy'] == $fleet['fleet_start_galaxy']) AND |
|
| 112 | - ($planetrow['system'] == $fleet['fleet_start_system']) AND |
|
| 113 | - ($planetrow['planet'] == $fleet['fleet_start_planet']) AND |
|
| 111 | + ($planetrow['galaxy'] == $fleet['fleet_start_galaxy']) and |
|
| 112 | + ($planetrow['system'] == $fleet['fleet_start_system']) and |
|
| 113 | + ($planetrow['planet'] == $fleet['fleet_start_planet']) and |
|
| 114 | 114 | ($planetrow['planet_type'] == $fleet['fleet_start_type'])); |
| 115 | 115 | break; |
| 116 | 116 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | else |
| 60 | 60 | { |
| 61 | - if (($destination_planet["debris_metal"] > $RecyclerCapacity / 2) AND |
|
| 61 | + if (($destination_planet["debris_metal"] > $RecyclerCapacity / 2) and |
|
| 62 | 62 | ($destination_planet["debris_crystal"] > $RecyclerCapacity / 2)) |
| 63 | 63 | { |
| 64 | 64 | $RecycledGoods["metal"] = $RecyclerCapacity / 2; |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | |
| 171 | 171 | function upd_db_unit_by_location($user_id = 0, $location_type, $location_id, $unit_snid = 0, $for_update = false, $fields = '*') { |
| 172 | 172 | return db_fetch(upd_do_query( |
| 173 | - "SELECT {$fields} |
|
| 173 | + "select {$fields} |
|
| 174 | 174 | FROM {{unit}} |
| 175 | 175 | WHERE |
| 176 | 176 | `unit_location_type` = {$location_type} AND `unit_location_id` = {$location_id} AND " . DBStaticUnit::db_unit_time_restrictions() . |