Completed
Branch work-fleets (5b06a4)
by SuperNova.WS
04:52
created
includes/functions/_news.php 1 patch
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@  discard block
 block discarded – undo
11 11
   $announce_list = db_news_list_get_by_query($template, $query_where, $query_limit);
12 12
 
13 13
   $users = array();
14
-  while($announce = db_fetch($announce_list)) {
15
-    if($announce['user_id'] && !isset($users[$announce['user_id']])) {
14
+  while ($announce = db_fetch($announce_list)) {
15
+    if ($announce['user_id'] && !isset($users[$announce['user_id']])) {
16 16
       $users[$announce['user_id']] = db_user_by_id($announce['user_id']);
17 17
     }
18 18
 
19 19
     $survey_vote = array('survey_vote_id' => 1);
20 20
     $survey_complete = strtotime($announce['survey_until']) < SN_TIME_NOW;
21 21
 
22
-    if($announce['survey_id'] && !empty($user['id'])) {
22
+    if ($announce['survey_id'] && !empty($user['id'])) {
23 23
       $survey_vote = !$survey_complete ? db_survey_get_vote($announce, $user) : array();
24 24
     }
25 25
 
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
       'ANNOUNCE'        => cht_message_parse($announce['strAnnounce'], false, intval($announce['authlevel'])),
32 32
       'DETAIL_URL'      => $announce['detail_url'],
33 33
       'USER_NAME'       =>
34
-        isset($users[$announce['user_id']]) && $users[$announce['user_id']] ? player_nick_render_to_html($users[$announce['user_id']], array('color' => true)) :
35
-          js_safe_string($announce['user_name']),
34
+        isset($users[$announce['user_id']]) && $users[$announce['user_id']] ? player_nick_render_to_html($users[$announce['user_id']], array('color' => true)) : js_safe_string($announce['user_name']),
36 35
       'NEW'             => $announce['unix_time'] + $config->game_news_actual >= SN_TIME_NOW,
37 36
       'FUTURE'          => $announce['unix_time'] > SN_TIME_NOW,
38 37
       'SURVEY_ID'       => $announce['survey_id'],
@@ -42,25 +41,25 @@  discard block
 block discarded – undo
42 41
       'SURVEY_UNTIL'    => $announce['survey_until'],
43 42
     ));
44 43
 
45
-    foreach($announce_exploded as $announce_paragraph) {
44
+    foreach ($announce_exploded as $announce_paragraph) {
46 45
       $template->assign_block_vars('announces.paragraph', array(
47 46
         'TEXT' => $announce_paragraph,
48 47
       ));
49 48
     }
50 49
 
51
-    if($announce['survey_id']) {
50
+    if ($announce['survey_id']) {
52 51
       $survey_query = db_survey_get_answer_texts($announce);
53 52
       $survey_vote_result = array();
54 53
       $total_votes = 0;
55
-      while($row = db_fetch($survey_query)) {
54
+      while ($row = db_fetch($survey_query)) {
56 55
         $survey_vote_result[] = $row;
57 56
         $total_votes += $row['VOTES'];
58 57
       }
59 58
 
60
-      if(empty($survey_vote) && !$survey_complete) {
59
+      if (empty($survey_vote) && !$survey_complete) {
61 60
         // Can vote
62 61
         $survey_query = db_survey_answers_get_list_by_parent($announce);
63
-        while($row = db_fetch($survey_query)) {
62
+        while ($row = db_fetch($survey_query)) {
64 63
           $template->assign_block_vars('announces.survey_answers', array(
65 64
             'ID'   => $row['survey_answer_id'],
66 65
             'TEXT' => $row['survey_answer_text'],
@@ -68,7 +67,7 @@  discard block
 block discarded – undo
68 67
         }
69 68
       } else {
70 69
         // Show result
71
-        foreach($survey_vote_result as &$vote_result) {
70
+        foreach ($survey_vote_result as &$vote_result) {
72 71
           $vote_percent = $total_votes ? $vote_result['VOTES'] / $total_votes * 100 : 0;
73 72
           $vote_result['PERCENT'] = $vote_percent;
74 73
           $vote_result['PERCENT_TEXT'] = round($vote_percent, 1);
@@ -85,7 +84,7 @@  discard block
 block discarded – undo
85 84
 }
86 85
 
87 86
 function nws_mark_read(&$user) {
88
-  if(isset($user['id'])) {
87
+  if (isset($user['id'])) {
89 88
     db_user_set_by_id($user['id'], '`news_lastread` = ' . SN_TIME_NOW);
90 89
     $user['news_lastread'] = SN_TIME_NOW;
91 90
   }
@@ -94,17 +93,17 @@  discard block
 block discarded – undo
94 93
 }
95 94
 
96 95
 function survey_vote(&$user) {
97
-  if(empty($user['id'])) {
96
+  if (empty($user['id'])) {
98 97
     return true;
99 98
   }
100 99
 
101 100
   sn_db_transaction_start();
102 101
   $survey_id = sys_get_param_id('survey_id');
103 102
   $is_voted = db_survey_vote_get($user, $survey_id);
104
-  if(empty($is_voted)) {
103
+  if (empty($is_voted)) {
105 104
     $survey_vote_id = sys_get_param_id('survey_vote');
106 105
     $is_answer_exists = db_survey_answer_get($survey_id, $survey_vote_id);
107
-    if(!empty($is_answer_exists)) {
106
+    if (!empty($is_answer_exists)) {
108 107
       $user_name_safe = db_escape($user['username']);
109 108
       db_survey_vote_insert($user, $survey_id, $survey_vote_id, $user_name_safe);
110 109
     }
Please login to merge, or discard this patch.
includes/functions/sys_maintenance.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
     ),
25 25
   );
26 26
 
27
-  foreach($queries as &$query) {
28
-    if(!empty($query['query'])) {
27
+  foreach ($queries as &$query) {
28
+    if (!empty($query['query'])) {
29 29
       $query['result'] = doquery($query['query']);
30
-    } elseif(!empty($query['callable']) && is_callable($query['callable'])) {
30
+    } elseif (!empty($query['callable']) && is_callable($query['callable'])) {
31 31
       call_user_func($query['callable']);
32 32
     }
33 33
     $query['error'] = classSupernova::$db->db_error();
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
   $today_array = array($today_array['seconds'], $today_array['minutes'], $today_array['hours'], $today_array['mday'], $today_array['mon'], $today_array['year']);
72 72
 //  pdump($prev_run_array);
73 73
   $scheduleList = explode(',', $scheduleList);
74
-  array_walk($scheduleList, function (&$schedule) use ($prev_run_array, $today_array, $date_part_names_reverse, &$possible_schedules) {
74
+  array_walk($scheduleList, function(&$schedule) use ($prev_run_array, $today_array, $date_part_names_reverse, &$possible_schedules) {
75 75
     // pdump($schedule);
76 76
     $schedule = array('schedule_array' => array_reverse(explode(':', trim($schedule))));
77 77
 
@@ -83,21 +83,21 @@  discard block
 block discarded – undo
83 83
     */
84 84
     // pdump($schedule);
85 85
 
86
-    foreach($prev_run_array as $index => $date_part) {
86
+    foreach ($prev_run_array as $index => $date_part) {
87 87
       $schedule['array']['recorded'][$index] = isset($schedule['schedule_array'][$index]) ? intval($schedule['schedule_array'][$index]) : $date_part;
88 88
       $schedule['array']['now'][$index] = isset($schedule['schedule_array'][$index]) ? intval($schedule['schedule_array'][$index]) : $today_array[$index];
89 89
     }
90
-    if($schedule['array']['recorded'] == $schedule['array']['now']) {
90
+    if ($schedule['array']['recorded'] == $schedule['array']['now']) {
91 91
       unset($schedule['array']['now']);
92 92
     }
93 93
 
94
-    foreach($schedule['array'] as $name => $array) {
94
+    foreach ($schedule['array'] as $name => $array) {
95 95
       $schedule['string'][$name] = "{$array[5]}-{$array[4]}-{$array[3]} {$array[2]}:{$array[1]}:{$array[0]}";
96 96
       $schedule['string'][$name . '_next'] = $schedule['string'][$name] . ' +1 ' . $interval;
97 97
       $schedule['string'][$name . '_prev'] = $schedule['string'][$name] . ' -1 ' . $interval;
98 98
     }
99 99
 
100
-    foreach($schedule['string'] as $string) {
100
+    foreach ($schedule['string'] as $string) {
101 101
       $timestamp = strtotime($string);
102 102
       $schedule['timestamp'][$timestamp] = $possible_schedules[$timestamp] = date(FMT_DATE_TIME_SQL, strtotime($string));
103 103
     }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
   $prev_run = 0;
131 131
   $next_run = 0;
132
-  foreach($possible_schedules as $timestamp => $string_date) {
132
+  foreach ($possible_schedules as $timestamp => $string_date) {
133 133
     $prev_run = SN_TIME_NOW >= $timestamp ? $timestamp : $prev_run;
134 134
     $next_run = SN_TIME_NOW < $timestamp && !$next_run ? $timestamp : $next_run;
135 135
 //    pdump($schedule, '$schedule ' . date(FMT_DATE_TIME_SQL, $schedule));
Please login to merge, or discard this patch.
includes/functions/geoip.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-function geoip_status(){return sn_function_call(__FUNCTION__, array(&$result));}
3
+function geoip_status() {return sn_function_call(__FUNCTION__, array(&$result)); }
4 4
 function sn_geoip_status(&$result) {
5 5
   return $result = false;
6 6
 }
7 7
 
8
-function geoip_ip_info($ip){return sn_function_call(__FUNCTION__, array($ip, &$result));}
8
+function geoip_ip_info($ip) {return sn_function_call(__FUNCTION__, array($ip, &$result)); }
9 9
 function sn_geoip_ip_info($ip, &$result) {
10 10
   return $result = false;
11 11
 }
Please login to merge, or discard this patch.
includes/functions/ali_alliances.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 function ali_rank_list_save($ranks) {
4 4
   global $user;
5 5
 
6
-  if(!empty($ranks)) {
7
-    foreach($ranks as $rank => $rights) {
6
+  if (!empty($ranks)) {
7
+    foreach ($ranks as $rank => $rights) {
8 8
       $rights = implode(',', $rights);
9 9
       $ranklist .= $rights . ';';
10 10
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
   $temp_array = array();
23 23
   $query = db_ally_diplomacy_get_relations($ally_from, $ally_to);
24 24
 
25
-  while($record = db_fetch($query)) {
25
+  while ($record = db_fetch($query)) {
26 26
     $temp_array[$record['alliance_diplomacy_contr_ally_id']] = $record;
27 27
   }
28 28
 
Please login to merge, or discard this patch.
includes/db/db_helpers.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@
 block discarded – undo
27 27
  */
28 28
 function db_set_make_safe_string($set, $delta = false) {
29 29
   $set_safe = array();
30
-  foreach($set as $field => $value) {
31
-    if(empty($field)) {
30
+  foreach ($set as $field => $value) {
31
+    if (empty($field)) {
32 32
       continue;
33 33
     }
34 34
 
35 35
     $field = '`' . db_escape($field) . '`';
36 36
     $new_value = $value;
37
-    if($value === null) {
37
+    if ($value === null) {
38 38
       $new_value = 'NULL';
39
-    } elseif(is_string($value) && (string)($new_value = floatval($value)) != (string)$value) {
39
+    } elseif (is_string($value) && (string) ($new_value = floatval($value)) != (string) $value) {
40 40
       // non-float
41 41
       $new_value = '"' . db_escape($value) . '"';
42
-    } elseif($delta) {
42
+    } elseif ($delta) {
43 43
       // float and DELTA-set
44 44
       $new_value = "{$field} + ({$new_value})";
45 45
     }
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: Gorlum
5
- * Date: 26.12.2015
6
- * Time: 17:19
7
- */
3
+   * Created by PhpStorm.
4
+   * User: Gorlum
5
+   * Date: 26.12.2015
6
+   * Time: 17:19
7
+   */
8 8
 
9 9
 /**
10 10
  * Normalize and make ID safe
Please login to merge, or discard this patch.
includes/includes/flt_mission_hold.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  * @copyright 2008 by Gorlum for Project "SuperNova.WS"
11 11
  */
12 12
 function flt_mission_hold($mission_data) {
13
-  if($mission_data->fleet->time_mission_job_complete < SN_TIME_NOW) {
13
+  if ($mission_data->fleet->time_mission_job_complete < SN_TIME_NOW) {
14 14
     $mission_data->fleet->mark_fleet_as_returned_and_save();
15 15
 
16 16
     return CACHE_FLEET;
Please login to merge, or discard this patch.
includes/includes/upd_helpers.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('IN_UPDATE')) {
3
+if (!defined('IN_UPDATE')) {
4 4
   die('Trying to call update helpers externally!');
5 5
 }
6 6
 
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
   global $update_tables;
9 9
 
10 10
   upd_add_more_time();
11
-  if(!$no_log) {
11
+  if (!$no_log) {
12 12
     upd_log_message("Performing query '{$query}'");
13 13
   }
14 14
 
15 15
   // classSupernova::$db->sn_db_connect();
16
-  if(!(strpos($query, '{{') === false)) {
17
-    foreach($update_tables as $tableName => $cork) {
16
+  if (!(strpos($query, '{{') === false)) {
17
+    foreach ($update_tables as $tableName => $cork) {
18 18
       $query = str_replace("{{{$tableName}}}", classSupernova::$db->db_prefix . $tableName, $query);
19 19
     }
20 20
   }
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
   global $config, $sys_log_disabled;
28 28
 
29 29
   $config->db_loadItem($key);
30
-  if($condition || !isset($config->$key)) {
30
+  if ($condition || !isset($config->$key)) {
31 31
     upd_add_more_time();
32
-    if(!$sys_log_disabled) {
32
+    if (!$sys_log_disabled) {
33 33
       upd_log_message("Updating config key '{$key}' with value '{$default_value}'");
34 34
     }
35 35
     $config->db_saveItem($key, $default_value);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 function upd_log_message($message) {
58 58
   global $sys_log_disabled, $upd_log, $debug;
59 59
 
60
-  if($sys_log_disabled) {
60
+  if ($sys_log_disabled) {
61 61
 //    print("{$message}<br />");
62 62
   } else {
63 63
     $upd_log .= "{$message}\r\n";
@@ -68,15 +68,15 @@  discard block
 block discarded – undo
68 68
 function upd_unset_table_info($table_name) {
69 69
   global $update_tables, $update_indexes, $update_foreigns;
70 70
 
71
-  if(isset($update_tables[$table_name])) {
71
+  if (isset($update_tables[$table_name])) {
72 72
     unset($update_tables[$table_name]);
73 73
   }
74 74
 
75
-  if(isset($update_indexes[$table_name])) {
75
+  if (isset($update_indexes[$table_name])) {
76 76
     unset($update_indexes[$table_name]);
77 77
   }
78 78
 
79
-  if(isset($update_foreigns[$table_name])) {
79
+  if (isset($update_foreigns[$table_name])) {
80 80
     unset($update_foreigns[$table_name]);
81 81
   }
82 82
 }
@@ -90,18 +90,18 @@  discard block
 block discarded – undo
90 90
   upd_unset_table_info($tableName);
91 91
 
92 92
   $q1 = upd_do_query("SHOW FULL COLUMNS FROM {$prefix_table_name};", true);
93
-  while($r1 = db_fetch($q1)) {
93
+  while ($r1 = db_fetch($q1)) {
94 94
     $update_tables[$tableName][$r1['Field']] = $r1;
95 95
   }
96 96
 
97 97
   $q1 = upd_do_query("SHOW INDEX FROM {$prefix_table_name};", true);
98
-  while($r1 = db_fetch($q1)) {
98
+  while ($r1 = db_fetch($q1)) {
99 99
     $update_indexes[$tableName][$r1['Key_name']] .= "{$r1['Column_name']},";
100 100
     $update_indexes_full[$tableName][$r1['Key_name']][$r1['Column_name']] = $r1;
101 101
   }
102 102
 
103 103
   $q1 = upd_do_query("SELECT * FROM `information_schema`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = '" . db_escape(classSupernova::$db_name) . "' AND TABLE_NAME = '{$prefix_table_name}' AND REFERENCED_TABLE_NAME is not null;", true);
104
-  while($r1 = db_fetch($q1)) {
104
+  while ($r1 = db_fetch($q1)) {
105 105
     $table_referenced = str_replace($config->db_prefix, '', $r1['REFERENCED_TABLE_NAME']);
106 106
 
107 107
     $update_foreigns[$tableName][$r1['CONSTRAINT_NAME']] .= "{$r1['COLUMN_NAME']},{$table_referenced},{$r1['REFERENCED_COLUMN_NAME']};";
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 function upd_alter_table($table, $alters, $condition = true) {
119 119
   global $config;
120 120
 
121
-  if(!$condition) {
121
+  if (!$condition) {
122 122
     return;
123 123
   }
124 124
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
   $alters_print = is_array($alters) ? dump($alters) : $alters;
127 127
   upd_log_message("Altering table '{$table}' with alterations {$alters_print}");
128 128
 
129
-  if(!is_array($alters)) {
129
+  if (!is_array($alters)) {
130 130
     $alters = array($alters);
131 131
   }
132 132
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
   //$result = db_query($qry);
138 138
   $result = upd_do_query($qry);
139 139
   $error = db_error();
140
-  if($error) {
140
+  if ($error) {
141 141
     die("Altering error for table `{$table}`: {$error}<br />{$alters_print}");
142 142
   }
143 143
 
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 function upd_create_table($table_name, $declaration) {
161 161
   global $config, $update_tables;
162 162
 
163
-  if(!$update_tables[$table_name]) {
163
+  if (!$update_tables[$table_name]) {
164 164
     upd_do_query('set foreign_key_checks = 0;', true);
165 165
     $result = upd_do_query("CREATE TABLE IF NOT EXISTS `{$config->db_prefix}{$table_name}` {$declaration}");
166 166
     $error = db_error();
167
-    if($error) {
167
+    if ($error) {
168 168
       die("Creating error for table `{$table_name}`: {$error}<br />" . dump($declaration));
169 169
     }
170 170
     upd_do_query('set foreign_key_checks = 1;', true);
@@ -190,14 +190,14 @@  discard block
 block discarded – undo
190 190
 
191 191
 
192 192
 function upd_db_unit_changeset_prepare($unit_id, $unit_value, $user, $planet_id = null) {
193
-  if(!is_array($user)) {
193
+  if (!is_array($user)) {
194 194
     // TODO - remove later
195 195
     print('<h1>СООБЩИТЕ ЭТО АДМИНУ: sn_db_unit_changeset_prepare() - USER is not ARRAY</h1>');
196 196
     pdump(debug_backtrace());
197 197
     die('USER is not ARRAY');
198 198
   }
199 199
 
200
-  if(!isset($user['id']) || !$user['id']) {
200
+  if (!isset($user['id']) || !$user['id']) {
201 201
     // TODO - remove later
202 202
     print('<h1>СООБЩИТЕ ЭТО АДМИНУ: sn_db_unit_changeset_prepare() - USER[id] пустой</h1>');
203 203
     pdump($user);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
   $db_changeset = array();
214 214
   $temp = upd_db_unit_by_location($user['id'], $unit_location, $location_id, $unit_id, true, 'unit_id');
215
-  if($temp['unit_id']) {
215
+  if ($temp['unit_id']) {
216 216
     // update
217 217
     $db_changeset = array(
218 218
       'action' => SQL_OP_UPDATE,
@@ -257,41 +257,41 @@  discard block
 block discarded – undo
257 257
 
258 258
 
259 259
 function upd_db_changeset_apply($db_changeset) {
260
-  if(!is_array($db_changeset) || empty($db_changeset)) {
260
+  if (!is_array($db_changeset) || empty($db_changeset)) {
261 261
     return;
262 262
   }
263 263
 
264
-  foreach($db_changeset as $table_name => $table_data) {
265
-    foreach($table_data as $record_id => $conditions) {
264
+  foreach ($db_changeset as $table_name => $table_data) {
265
+    foreach ($table_data as $record_id => $conditions) {
266 266
       $where = '';
267
-      if(!empty($conditions['where'])) {
267
+      if (!empty($conditions['where'])) {
268 268
         $where = 'WHERE ' . implode(' AND ', $conditions['where']);
269 269
       }
270 270
 
271 271
       $fields = array();
272
-      if($conditions['fields']) {
273
-        foreach($conditions['fields'] as $field_name => $field_data) {
272
+      if ($conditions['fields']) {
273
+        foreach ($conditions['fields'] as $field_name => $field_data) {
274 274
           $condition = "`{$field_name}` = ";
275 275
           $value = '';
276
-          if($field_data['delta']) {
276
+          if ($field_data['delta']) {
277 277
             $value = "`{$field_name}`" . ($field_data['delta'] >= 0 ? '+' : '') . $field_data['delta'];
278
-          } elseif($field_data['set']) {
278
+          } elseif ($field_data['set']) {
279 279
             $value = (is_string($field_data['set']) ? "'{$field_data['set']}'" : $field_data['set']);
280 280
           }
281
-          if($value) {
281
+          if ($value) {
282 282
             $fields[] = $condition . $value;
283 283
           }
284 284
         }
285 285
       }
286 286
       $fields = implode(',', $fields);
287 287
 
288
-      switch($conditions['action']) {
288
+      switch ($conditions['action']) {
289 289
         case SQL_OP_DELETE:
290 290
           upd_do_query("DELETE FROM {{{$table_name}}} {$where}");
291 291
         break;
292 292
 
293 293
         case SQL_OP_UPDATE:
294
-          if($fields) {
294
+          if ($fields) {
295 295
             /*if($table_name == 'unit')
296 296
             {
297 297
               pdump("UPDATE {{{$table_name}}} SET {$fields} {$where}");
@@ -302,13 +302,13 @@  discard block
 block discarded – undo
302 302
         break;
303 303
 
304 304
         case SQL_OP_INSERT:
305
-          if($fields) {
305
+          if ($fields) {
306 306
             upd_do_query("INSERT INTO {{{$table_name}}} SET {$fields}");
307 307
           }
308 308
         break;
309 309
 
310 310
         case SQL_OP_REPLACE:
311
-          if($fields) {
311
+          if ($fields) {
312 312
             upd_do_query("REPLACE INTO {{{$table_name}}} SET {$fields}");
313 313
           }
314 314
         break;
Please login to merge, or discard this patch.
includes/includes/flt_mission_relocate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
   $destination_planet = &$mission_data->dst_planet;
18 18
 
19
-  if(empty($destination_planet['id_owner']) || $objFleet->playerOwnerId != $destination_planet['id_owner']) {
19
+  if (empty($destination_planet['id_owner']) || $objFleet->playerOwnerId != $destination_planet['id_owner']) {
20 20
     $objFleet->mark_fleet_as_returned_and_save();
21 21
 
22 22
     return CACHE_FLEET;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
       $fleet_resources[RES_DEUTERIUM], $lang['Deuterium']
32 32
     ) . '<br />' . $lang['sys_relocate_mess_user'];
33 33
   $fleet_real_array = $objFleet->get_unit_list();
34
-  foreach($fleet_real_array as $ship_id => $ship_count) {
34
+  foreach ($fleet_real_array as $ship_id => $ship_count) {
35 35
     $Message .= $lang['tech'][$ship_id] . ' - ' . $ship_count . '<br />';
36 36
   }
37 37
   msg_send_simple_message(
Please login to merge, or discard this patch.
includes/includes/flt_mission_transport.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
   $source_planet = &$mission_data->src_planet;
17 17
   $destination_planet = &$mission_data->dst_planet;
18 18
 
19
-  if(!isset($destination_planet['id']) || !$destination_planet['id_owner']) {
19
+  if (!isset($destination_planet['id']) || !$destination_planet['id_owner']) {
20 20
     $objFleet->mark_fleet_as_returned_and_save();
21 21
 
22 22
     return CACHE_FLEET;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     $fleet_resources[RES_DEUTERIUM], $lang['Deuterium']);
32 32
   msg_send_simple_message($objFleet->target_owner_id, '', $objFleet->time_arrive_to_target, MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
33 33
 
34
-  if($objFleet->target_owner_id <> $objFleet->playerOwnerId) {
34
+  if ($objFleet->target_owner_id <> $objFleet->playerOwnerId) {
35 35
     msg_send_simple_message($objFleet->playerOwnerId, '', $objFleet->time_arrive_to_target, MSG_TYPE_TRANSPORT, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
36 36
   }
37 37
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 /**
32 32
  * Fleet mission "Relocate"
33 33
  *
34
- * @param $mission_data Mission
34
+ * @param Mission $mission_data Mission
35 35
  *
36 36
  * @return int
37 37
  *
Please login to merge, or discard this patch.