Completed
Push — trunk ( c7e339...34029c )
by SuperNova.WS
04:10
created
admin/adm_log_main.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,12 +22,10 @@  discard block
 block discarded – undo
22 22
 if($delete = sys_get_param_id('delete'))
23 23
 {
24 24
   doquery("DELETE FROM `{{logs}}` WHERE `log_id` = {$delete} LIMIT 1;");
25
-}
26
-elseif(sys_get_param_str('delete_update_info'))
25
+} elseif(sys_get_param_str('delete_update_info'))
27 26
 {
28 27
   doquery("DELETE FROM `{{logs}}` WHERE `log_code` in (103, 180, 191);");
29
-}
30
-elseif(sys_get_param_str('deleteall') == 'yes')
28
+} elseif(sys_get_param_str('deleteall') == 'yes')
31 29
 {
32 30
 //  doquery("TRUNCATE TABLE `{{logs}}`");
33 31
 }
@@ -51,8 +49,7 @@  discard block
 block discarded – undo
51 49
     }
52 50
   }
53 51
   $template->assign_vars($errorInfo);
54
-}
55
-else
52
+} else
56 53
 {
57 54
   $template = gettemplate('admin/adm_log_main', true);
58 55
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,26 +18,26 @@  discard block
 block discarded – undo
18 18
 
19 19
 messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
20 20
 
21
-if($delete = sys_get_param_id('delete'))
21
+if ($delete = sys_get_param_id('delete'))
22 22
 {
23 23
   doquery("DELETE FROM `{{logs}}` WHERE `log_id` = {$delete} LIMIT 1;");
24 24
 }
25
-elseif(sys_get_param_str('delete_update_info'))
25
+elseif (sys_get_param_str('delete_update_info'))
26 26
 {
27 27
   doquery("DELETE FROM `{{logs}}` WHERE `log_code` in (103, 180, 191);");
28 28
 }
29
-elseif(sys_get_param_str('deleteall') == 'yes')
29
+elseif (sys_get_param_str('deleteall') == 'yes')
30 30
 {
31 31
 //  doquery("TRUNCATE TABLE `{{logs}}`");
32 32
 }
33 33
 
34
-if($detail = sys_get_param_id('detail'))
34
+if ($detail = sys_get_param_id('detail'))
35 35
 {
36 36
   $template = gettemplate('admin/adm_log_main_detail', true);
37 37
 
38 38
   $errorInfo = doquery("SELECT * FROM `{{logs}}` WHERE `log_id` = {$detail} LIMIT 1;", true);
39 39
   $error_dump = unserialize($errorInfo['log_dump']);
40
-  if(is_array($error_dump))
40
+  if (is_array($error_dump))
41 41
   {
42 42
     foreach ($error_dump as $key => $value)
43 43
     {
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 
58 58
   $i = 0;
59 59
   $query = doquery("SELECT * FROM `{{logs}}` ORDER BY log_id DESC LIMIT 100;");
60
-  while($u = db_fetch($query))
60
+  while ($u = db_fetch($query))
61 61
   {
62 62
     $i++;
63 63
     $v = array();
64
-    foreach($u as $key => $value)
64
+    foreach ($u as $key => $value)
65 65
     {
66 66
       $v[strtoupper($key)] = $value;
67 67
     }
Please login to merge, or discard this patch.
admin/adm_message_list.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@
 block discarded – undo
72 72
 if(sys_get_param('page_prev') && $int_page_current > 1)
73 73
 {
74 74
   $int_page_current--;
75
-}
76
-elseif(sys_get_param('page_next') && $int_page_current < $page_max)
75
+} elseif(sys_get_param('page_next') && $int_page_current < $page_max)
77 76
 {
78 77
   $int_page_current++;
79 78
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
  *
9 9
  */
10 10
 
11
-define('INSIDE'  , true);
12
-define('INSTALL' , false);
11
+define('INSIDE', true);
12
+define('INSTALL', false);
13 13
 define('IN_ADMIN', true);
14 14
 
15 15
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
   ),
29 29
 );
30 30
 $template->assign_block_vars('int_type_selected', $allowed_types[-1]);
31
-foreach($sn_message_class_list as $key => $value)
31
+foreach ($sn_message_class_list as $key => $value)
32 32
 {
33
-  if($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX)
33
+  if ($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX)
34 34
   {
35 35
     continue;
36 36
   }
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
 
44 44
 
45 45
 $message_delete = sys_get_param_id('msg_del');
46
-if(sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete))
46
+if (sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete))
47 47
 {
48 48
   $message_delete = implode(', ', $message_delete);
49 49
 }
50 50
 
51
-if($message_delete)
51
+if ($message_delete)
52 52
 {
53 53
   doquery("DELETE FROM {{messages}} WHERE `message_id` in ({$message_delete});");
54 54
   $template->assign_block_vars('result', array('MESSAGE' => sprintf($lang['mlst_messages_deleted'], $message_delete)));
55 55
 }
56 56
 
57 57
 
58
-if(sys_get_param('str_delete_date') && checkdate($month = sys_get_param_id('delete_month'), $day = sys_get_param_id('delete_day'), $year = sys_get_param_id('delete_year')))
58
+if (sys_get_param('str_delete_date') && checkdate($month = sys_get_param_id('delete_month'), $day = sys_get_param_id('delete_day'), $year = sys_get_param_id('delete_year')))
59 59
 {
60 60
   $delete_date = "{$year}-{$month}-{$day}";
61 61
   doquery("DELETE FROM {{messages}} WHERE message_time <= UNIX_TIMESTAMP('{$delete_date}')" . ($int_type_selected >= 0 ? " AND `message_type` = {$int_type_selected}" : ''));
@@ -68,16 +68,16 @@  discard block
 block discarded – undo
68 68
 
69 69
 $int_page_current = min(sys_get_param_id('int_page_current', 1), $page_max);
70 70
 
71
-if(sys_get_param('page_prev') && $int_page_current > 1)
71
+if (sys_get_param('page_prev') && $int_page_current > 1)
72 72
 {
73 73
   $int_page_current--;
74 74
 }
75
-elseif(sys_get_param('page_next') && $int_page_current < $page_max)
75
+elseif (sys_get_param('page_next') && $int_page_current < $page_max)
76 76
 {
77 77
   $int_page_current++;
78 78
 }
79 79
 
80
-for($i = 1; $i <= $page_max; $i++)
80
+for ($i = 1; $i <= $page_max; $i++)
81 81
 {
82 82
   $template->assign_block_vars('page', array('NUMBER' => $i));
83 83
 }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 $StartRec = ($int_page_current - 1) * 25;
86 86
 
87 87
 $Messages = db_message_list_admin_by_type($int_type_selected, $StartRec);
88
-while($row = db_fetch($Messages))
88
+while ($row = db_fetch($Messages))
89 89
 {
90 90
   $row['FROM'] = htmlentities($row['FROM'], ENT_COMPAT, 'UTF-8');
91 91
   $row['OWNER_NAME'] = htmlentities($row['OWNER_NAME'], ENT_COMPAT, 'UTF-8');
Please login to merge, or discard this patch.
banned.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
 $template = gettemplate('banned_body', true);
20 20
 
21 21
 $query = doquery("SELECT * FROM {{banned}} ORDER BY `ban_id` DESC;");
22
-$i=0;
23
-while($ban_row = db_fetch($query))
22
+$i = 0;
23
+while ($ban_row = db_fetch($query))
24 24
 {
25 25
   $template->assign_block_vars('banlist', array(
26 26
     'USER_NAME'   => $ban_row['ban_user_name'],
Please login to merge, or discard this patch.
records.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 include('common.' . substr(strrchr(__FILE__, '.'), 1));
13 13
 
14
-if(HIDE_BUILDING_RECORDS)
14
+if (HIDE_BUILDING_RECORDS)
15 15
 {
16 16
   return;
17 17
 }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 $user_name_cache = array();
36 36
 
37
-foreach($show_groups as $unit_group_id => $mode)
37
+foreach ($show_groups as $unit_group_id => $mode)
38 38
 {
39 39
   $template->assign_block_vars('records', array(
40 40
     'UNIT' => $lang['tech'][$unit_group_id],
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
   ));
44 44
   $unit_group = get_unit_param('techtree', $unit_group_id); // TODO - REWRITE!!!!
45 45
 
46
-  foreach($unit_group as $unit_id)
46
+  foreach ($unit_group as $unit_id)
47 47
   {
48 48
     $unit_name = &$lang['tech'][$unit_id];
49
-    if($unit_name)
49
+    if ($unit_name)
50 50
     {
51 51
       // TODO - ISUNITSTACKABLE!
52 52
       $data_row = $unit_group_id == UNIT_SHIPS || $unit_group_id == UNIT_DEFENCE ? db_unit_records_sum($unit_id, $user_skip_list_unit) : db_unit_records_plain($unit_id, $user_skip_list_unit);
53 53
 
54
-      if($data_row)
54
+      if ($data_row)
55 55
       {
56 56
         $template->assign_block_vars('records', array(
57 57
           'UNIT' => $unit_name,
Please login to merge, or discard this patch.
flotenajax.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@
 block discarded – undo
127 127
      `fleet_owner` = '{$user['id']}', `fleet_start_galaxy` = '{$planetrow['galaxy']}', `fleet_start_system` = '{$planetrow['system']}', `fleet_start_planet` = '{$planetrow['planet']}',
128 128
      `fleet_end_time` = '{$arrival}', `fleet_amount` = '{$fleet_ship_count}', `primaer` = '{$target_structure}';"
129 129
   );
130
-}
131
-else
130
+} else
132 131
 {
133 132
   $travel_data = flt_travel_data($user, $planetrow, $target_coord, $fleet_array, 10);
134 133
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
   'planet' => $target_planet = sys_get_param_int('planet'),
30 30
 );
31 31
 
32
-if(!uni_coordinates_valid($target_coord))
32
+if (!uni_coordinates_valid($target_coord))
33 33
 {
34 34
   die($lang['gs_c02']);
35 35
 }
36 36
 
37 37
 $target_mission = sys_get_param_int('mission');
38 38
 $sn_group_missions = sn_get_groups('missions');
39
-if(!isset($sn_group_missions[$target_mission]['AJAX']) || !$sn_group_missions[$target_mission]['AJAX'])
39
+if (!isset($sn_group_missions[$target_mission]['AJAX']) || !$sn_group_missions[$target_mission]['AJAX'])
40 40
 {
41 41
   die($lang['gs_c00']);
42 42
 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 $target_coord['planet_type'] = $target_planet_check;
53 53
 $target_row = DBStaticPlanet::db_planet_by_vector($target_coord);
54 54
 
55
-if(empty($target_row))
55
+if (empty($target_row))
56 56
 {
57 57
   $target_row = array(
58 58
     'galaxy' => $target_coord['galaxy'],
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 }
65 65
 
66 66
 $fleet_array = array();
67
-switch($target_mission)
67
+switch ($target_mission)
68 68
 {
69 69
   case MT_SPY:
70 70
     // $fleet_array[SHIP_SPY] = min(mrc_get_level($user, $planetrow, SHIP_SPY), abs($user['spio_anz']));
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
   break;
74 74
 
75 75
   case MT_RECYCLE:
76
-    foreach(sn_get_groups('flt_recyclers') as $unit_id)
76
+    foreach (sn_get_groups('flt_recyclers') as $unit_id)
77 77
     {
78
-      if($unit_count = mrc_get_level($user, $planetrow, $unit_id))
78
+      if ($unit_count = mrc_get_level($user, $planetrow, $unit_id))
79 79
       {
80 80
         $fleet_array[$unit_id] = $unit_count;
81 81
       }
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
 $cant_attack = flt_can_attack($planetrow, $target_row, $fleet_array, $target_mission, $options);
97 97
 
98 98
 
99
-if($cant_attack != ATTACK_ALLOWED)
99
+if ($cant_attack != ATTACK_ALLOWED)
100 100
 {
101 101
   die($lang['fl_attack_error'][$cant_attack]);
102 102
 }
103 103
 
104
-$FleetDBArray   = array();
104
+$FleetDBArray = array();
105 105
 $db_changeset = array();
106
-foreach($fleet_array as $unit_id => $unit_count)
106
+foreach ($fleet_array as $unit_id => $unit_count)
107 107
 {
108 108
   $FleetDBArray[] = "{$unit_id},{$unit_count}";
109 109
   $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($unit_id, -$unit_count, $user, $planetrow);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 $fleet_ship_count = array_sum($fleet_array);
114 114
 
115
-if($target_mission == MT_MISSILE)
115
+if ($target_mission == MT_MISSILE)
116 116
 {
117 117
   $distance = abs($target_coord['system'] - $planetrow['system']);
118 118
   $duration = round((30 + (60 * $distance)) / flt_server_flight_speed_multiplier());
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 {
131 131
   $travel_data = flt_travel_data($user, $planetrow, $target_coord, $fleet_array, 10);
132 132
 
133
-  if($planetrow['deuterium'] < $travel_data['consumption'])
133
+  if ($planetrow['deuterium'] < $travel_data['consumption'])
134 134
   {
135 135
     die($lang['gs_c13']);
136 136
   }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 $ships_sent = array();
190 190
 //$ships_sent_js = array();
191 191
 $ships_sent_js = 0;
192
-foreach($fleet_array as $unit_id => $unit_count)
192
+foreach ($fleet_array as $unit_id => $unit_count)
193 193
 {
194 194
   $ships_sent[] = "{$unit_count} {$lang['tech'][$unit_id]}";
195 195
   $ships_sent_js += mrc_get_level($user, $planetrow, $unit_id, false, true);
@@ -198,6 +198,6 @@  discard block
 block discarded – undo
198 198
 //$ships_sent_js = implode(',', $ships_sent_js);
199 199
 $ships_sent_js = "{$unit_group}={$ships_sent_js}";
200 200
 
201
-$ResultMessage  = "{$lang['gs_sending']} {$ships_sent} {$lang['gs_to']} {$target_coord['galaxy']}:{$target_coord['system']}:{$target_coord['planet']}|{$ships_sent_js}";
201
+$ResultMessage = "{$lang['gs_sending']} {$ships_sent} {$lang['gs_to']} {$target_coord['galaxy']}:{$target_coord['system']}:{$target_coord['planet']}|{$ships_sent_js}";
202 202
 
203 203
 die($ResultMessage);
Please login to merge, or discard this patch.
language/en/search.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 
32 34
 $a_lang_array = (array(
Please login to merge, or discard this patch.
language/en/tech.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 $a_lang_array = (array(
32 34
   'tech_storage_max' => 'Max. storage capacity',
Please login to merge, or discard this patch.
language/en/login.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 global $config;
32 34
 
Please login to merge, or discard this patch.
language/en/payment.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 * DO NOT CHANGE
24 24
 */
25 25
 
26
-if (!defined('INSIDE')) die();
26
+if (!defined('INSIDE')) {
27
+  die();
28
+}
27 29
 
28 30
 $a_lang_array = (array(
29 31
   // Metamatter
Please login to merge, or discard this patch.