Test Failed
Push — trunk ( b76cfb...dfde47 )
by SuperNova.WS
03:49
created
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.
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
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
   'planet' => $target_planet = sys_get_param_int('planet'),
36 36
 );
37 37
 
38
-if(!uni_coordinates_valid($target_coord))
38
+if (!uni_coordinates_valid($target_coord))
39 39
 {
40 40
   die($lang['gs_c02']);
41 41
 }
42 42
 
43 43
 $target_mission = sys_get_param_int('mission');
44 44
 $sn_group_missions = sn_get_groups('missions');
45
-if(!isset($sn_group_missions[$target_mission]['AJAX']) || !$sn_group_missions[$target_mission]['AJAX'])
45
+if (!isset($sn_group_missions[$target_mission]['AJAX']) || !$sn_group_missions[$target_mission]['AJAX'])
46 46
 {
47 47
   die($lang['gs_c00']);
48 48
 }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 $target_coord['planet_type'] = $target_planet_check;
59 59
 $target_row = DBStaticPlanet::db_planet_by_vector($target_coord);
60 60
 
61
-if(empty($target_row))
61
+if (empty($target_row))
62 62
 {
63 63
   $target_row = array(
64 64
     'galaxy' => $target_coord['galaxy'],
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 }
71 71
 
72 72
 $fleet_array = array();
73
-switch($target_mission)
73
+switch ($target_mission)
74 74
 {
75 75
   case MT_SPY:
76 76
     // $fleet_array[SHIP_SPY] = min(mrc_get_level($user, $planetrow, SHIP_SPY), abs($user['spio_anz']));
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
   break;
80 80
 
81 81
   case MT_RECYCLE:
82
-    foreach(sn_get_groups('flt_recyclers') as $unit_id)
82
+    foreach (sn_get_groups('flt_recyclers') as $unit_id)
83 83
     {
84
-      if($unit_count = mrc_get_level($user, $planetrow, $unit_id))
84
+      if ($unit_count = mrc_get_level($user, $planetrow, $unit_id))
85 85
       {
86 86
         $fleet_array[$unit_id] = $unit_count;
87 87
       }
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
 $cant_attack = flt_can_attack($planetrow, $target_row, $fleet_array, $target_mission, $options);
103 103
 
104 104
 
105
-if($cant_attack != ATTACK_ALLOWED)
105
+if ($cant_attack != ATTACK_ALLOWED)
106 106
 {
107 107
   die($lang['fl_attack_error'][$cant_attack]);
108 108
 }
109 109
 
110
-$FleetDBArray   = array();
110
+$FleetDBArray = array();
111 111
 $db_changeset = array();
112
-foreach($fleet_array as $unit_id => $unit_count)
112
+foreach ($fleet_array as $unit_id => $unit_count)
113 113
 {
114 114
   $FleetDBArray[] = "{$unit_id},{$unit_count}";
115 115
   $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($unit_id, -$unit_count, $user, $planetrow);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
 $fleet_ship_count = array_sum($fleet_array);
120 120
 
121
-if($target_mission == MT_MISSILE)
121
+if ($target_mission == MT_MISSILE)
122 122
 {
123 123
   $distance = abs($target_coord['system'] - $planetrow['system']);
124 124
   $duration = round((30 + (60 * $distance)) / Universe::flt_server_flight_speed_multiplier());
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 {
137 137
   $travel_data = flt_travel_data($user, $planetrow, $target_coord, $fleet_array, 10);
138 138
 
139
-  if($planetrow['deuterium'] < $travel_data['consumption'])
139
+  if ($planetrow['deuterium'] < $travel_data['consumption'])
140 140
   {
141 141
     die($lang['gs_c13']);
142 142
   }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 $ships_sent = array();
175 175
 //$ships_sent_js = array();
176 176
 $ships_sent_js = 0;
177
-foreach($fleet_array as $unit_id => $unit_count)
177
+foreach ($fleet_array as $unit_id => $unit_count)
178 178
 {
179 179
   $ships_sent[] = "{$unit_count} {$lang['tech'][$unit_id]}";
180 180
   $ships_sent_js += mrc_get_level($user, $planetrow, $unit_id, false, true);
@@ -183,6 +183,6 @@  discard block
 block discarded – undo
183 183
 //$ships_sent_js = implode(',', $ships_sent_js);
184 184
 $ships_sent_js = "{$unit_group}={$ships_sent_js}";
185 185
 
186
-$ResultMessage  = "{$lang['gs_sending']} {$ships_sent} {$lang['gs_to']} {$target_coord['galaxy']}:{$target_coord['system']}:{$target_coord['planet']}|{$ships_sent_js}";
186
+$ResultMessage = "{$lang['gs_sending']} {$ships_sent} {$lang['gs_to']} {$target_coord['galaxy']}:{$target_coord['system']}:{$target_coord['planet']}|{$ships_sent_js}";
187 187
 
188 188
 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.
language/en/stat.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
   'stat_header' => 'Statistics',
Please login to merge, or discard this patch.
language/en/system.mo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -951,7 +951,7 @@
 block discarded – undo
951 951
     REGISTER_ERROR_USERNAME_WRONG => 'Wrong player name',
952 952
     REGISTER_ERROR_ACCOUNT_NAME_EXISTS => 'Account name already registered',
953 953
     REGISTER_ERROR_PASSWORD_INSECURE => 'Insecure or wrong password. Password should be at least ' . PASSWORD_LENGTH_MIN . ' characters long and cannot start or end with spaces',
954
-    REGISTER_ERROR_USERNAME_SHORT => 'Слишком короткое имя. Имя должно состоять минимум из ' . LOGIN_LENGTH_MIN. ' символов',
954
+    REGISTER_ERROR_USERNAME_SHORT => 'Слишком короткое имя. Имя должно состоять минимум из ' . LOGIN_LENGTH_MIN . ' символов',
955 955
     REGISTER_ERROR_PASSWORD_DIFFERENT => 'Password does not match confirmation password',
956 956
     REGISTER_ERROR_EMAIL_EMPTY => 'Е-Мейл не может быть пустым',
957 957
     REGISTER_ERROR_EMAIL_WRONG => 'Введенный Е-Мейл не является адресом электронной почты',
Please login to merge, or discard this patch.