Test Failed
Push — trunk ( 132e87...b3f953 )
by SuperNova.WS
11:54
created
language/ru/menu.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
 * DO NOT CHANGE
25 25
 */
26 26
 
27
-if (!defined('INSIDE')) die();
27
+if (!defined('INSIDE')) {
28
+  die();
29
+}
28 30
 
29 31
 $a_lang_array = (array(
30 32
   'Multiverse' => '<b>Сервер</b> Uni',
Please login to merge, or discard this patch.
language/ru/artifacts.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
   'art_use'             => 'Использовать артефакт',
Please login to merge, or discard this patch.
language/ru/market.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
 * DO NOT CHANGE
25 25
 */
26 26
 
27
-if (!defined('INSIDE')) die();
27
+if (!defined('INSIDE')) {
28
+  die();
29
+}
28 30
 
29 31
 $a_lang_array = (array(
30 32
   'eco_mrk_title' => 'Чёрный Рынок',
Please login to merge, or discard this patch.
language/ru/fleet.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
 * DO NOT CHANGE
25 25
 */
26 26
 
27
-if (!defined('INSIDE')) die();
27
+if (!defined('INSIDE')) {
28
+  die();
29
+}
28 30
 
29 31
 $a_lang_array = (array(
30 32
   'flt_page2_title' => 'Выбор задания',
Please login to merge, or discard this patch.
includes/alliance/ali_internal_members.inc 2 patches
Spacing   +15 added lines, -15 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('SN_IN_ALLY') || SN_IN_ALLY !== true)
3
+if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true)
4 4
 {
5 5
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
6 6
 }
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 */
11 11
 // Changing rank for single user
12 12
 $id_user = sys_get_param_id('id_user');
13
-if(isset($_GET['id_rank']))
13
+if (isset($_GET['id_rank']))
14 14
 {
15 15
   $id_rank = sys_get_param_int('id_rank');
16 16
 }
17
-if($id_user && isset($id_rank) && $user_admin){
17
+if ($id_user && isset($id_rank) && $user_admin) {
18 18
   db_user_set_by_id($id_user, "`ally_rank_id` = {$id_rank}");
19 19
 }
20 20
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 }
43 43
 
44 44
 $sort1 = sys_get_param_int('sort1');
45
-if($sort1>5 || $sort1<0) $sort1 = 0;
45
+if ($sort1 > 5 || $sort1 < 0) $sort1 = 0;
46 46
 $sort1s = array(
47 47
   0 => '`ally_rank_id` %1$s;',
48 48
   1 => '`username` %1$s;',
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
   'id, username, galaxy, system, planet, onlinetime, ally_rank_id, ally_register_time, total_points');
59 59
 
60 60
 // while ($userRow = db_fetch($userList))
61
-foreach($userList as $userRow)
61
+foreach ($userList as $userRow)
62 62
 {
63 63
   $i++;
64 64
   if (!isset($ranks[$userRow['ally_rank_id']]))
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
 
69 69
   if ($ally['ally_owner'] == $userRow['id'])
70 70
   {
71
-    $ally_range = ($ally['ally_owner_range'])?$ally['ally_owner_range']:$lang['Founder'];
71
+    $ally_range = ($ally['ally_owner_range']) ? $ally['ally_owner_range'] : $lang['Founder'];
72 72
   }
73 73
   else
74 74
   {
75
-    if($user_admin)
75
+    if ($user_admin)
76 76
     {
77 77
       $ally_range = '<select onchange="window.location=\'alliance.php?mode=admin&edit=members&id_user=' . $userRow['id'] . '&id_rank=\' + this.value">';
78 78
 
79
-      foreach($ranks as $rankID => $rankArray){
79
+      foreach ($ranks as $rankID => $rankArray) {
80 80
         $ally_range .= '<option value="' . $rankID . '"';
81
-        if($rankID == $userRow['ally_rank_id'])
81
+        if ($rankID == $userRow['ally_rank_id'])
82 82
           $ally_range .= " selected";
83 83
         $ally_range .= '>' . $rankArray['name'];
84 84
         $ally_range .= '</option>';
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
   }
93 93
 
94 94
   $last_active = time() - $userRow["onlinetime"];
95
-  if($user_admin)
95
+  if ($user_admin)
96 96
   {
97
-    if ( $last_active < 60 )
97
+    if ($last_active < 60)
98 98
     {
99 99
       $tmp = "lime>{$lang['On']}";
100 100
     }
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
     }
106 106
     elseif ($last_active < 60 * 60 * 24)
107 107
     {
108
-      $last_active = round( $last_active / (60 * 60));
108
+      $last_active = round($last_active / (60 * 60));
109 109
       $tmp = "green>{$last_active} {$lang['sys_hrs_short']}";
110 110
     }
111 111
     else
112 112
     {
113
-      $last_active = round( $last_active / (60 * 60 * 24));
113
+      $last_active = round($last_active / (60 * 60 * 24));
114 114
       if ($last_active < 7)
115 115
       {
116 116
         $tmp = "yellow";
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
   }
129 129
   else
130 130
   {
131
-    if($user_onlinestatus)
131
+    if ($user_onlinestatus)
132 132
     {
133
-      if ( $last_active < 60 * 5 )
133
+      if ($last_active < 60 * 5)
134 134
       {
135 135
         $tmp = "lime>{$lang['On']}";
136 136
       }
Please login to merge, or discard this patch.
Braces   +18 added lines, -27 removed lines patch added patch discarded remove patch
@@ -34,15 +34,16 @@  discard block
 block discarded – undo
34 34
 {
35 35
   $sort2s = "DESC";
36 36
   $sort2 = 0;
37
-}
38
-else
37
+} else
39 38
 {
40 39
   $sort2s = "ASC";
41 40
   $sort2 = 1;
42 41
 }
43 42
 
44 43
 $sort1 = sys_get_param_int('sort1');
45
-if($sort1>5 || $sort1<0) $sort1 = 0;
44
+if($sort1>5 || $sort1<0) {
45
+  $sort1 = 0;
46
+}
46 47
 $sort1s = array(
47 48
   0 => '`ally_rank_id` %1$s;',
48 49
   1 => '`username` %1$s;',
@@ -69,8 +70,7 @@  discard block
 block discarded – undo
69 70
   if ($ally['ally_owner'] == $userRow['id'])
70 71
   {
71 72
     $ally_range = ($ally['ally_owner_range'])?$ally['ally_owner_range']:$lang['Founder'];
72
-  }
73
-  else
73
+  } else
74 74
   {
75 75
     if($user_admin)
76 76
     {
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
 
79 79
       foreach($ranks as $rankID => $rankArray){
80 80
         $ally_range .= '<option value="' . $rankID . '"';
81
-        if($rankID == $userRow['ally_rank_id'])
82
-          $ally_range .= " selected";
81
+        if($rankID == $userRow['ally_rank_id']) {
82
+                  $ally_range .= " selected";
83
+        }
83 84
         $ally_range .= '>' . $rankArray['name'];
84 85
         $ally_range .= '</option>';
85 86
       }
86 87
       $ally_range .= '</select>';
87
-    }
88
-    else
88
+    } else
89 89
     {
90 90
       $ally_range = $ranks[$userRow['ally_rank_id']]['name'];
91 91
     }
@@ -97,53 +97,44 @@  discard block
 block discarded – undo
97 97
     if ( $last_active < 60 )
98 98
     {
99 99
       $tmp = "lime>{$lang['On']}";
100
-    }
101
-    elseif ($last_active < 60 * 60)
100
+    } elseif ($last_active < 60 * 60)
102 101
     {
103 102
       $last_active = round($last_active / 60);
104 103
       $tmp = "lime>{$last_active} {$lang['sys_min_short']}";
105
-    }
106
-    elseif ($last_active < 60 * 60 * 24)
104
+    } elseif ($last_active < 60 * 60 * 24)
107 105
     {
108 106
       $last_active = round( $last_active / (60 * 60));
109 107
       $tmp = "green>{$last_active} {$lang['sys_hrs_short']}";
110
-    }
111
-    else
108
+    } else
112 109
     {
113 110
       $last_active = round( $last_active / (60 * 60 * 24));
114 111
       if ($last_active < 7)
115 112
       {
116 113
         $tmp = "yellow";
117
-      }
118
-      elseif ($last_active < 30)
114
+      } elseif ($last_active < 30)
119 115
       {
120 116
         $tmp = "orange";
121
-      }
122
-      else
117
+      } else
123 118
       {
124 119
         $tmp = "red";
125 120
       }
126 121
       $tmp .= ">{$last_active} {$lang['sys_day_short']}";
127 122
     }
128
-  }
129
-  else
123
+  } else
130 124
   {
131 125
     if($user_onlinestatus)
132 126
     {
133 127
       if ( $last_active < 60 * 5 )
134 128
       {
135 129
         $tmp = "lime>{$lang['On']}";
136
-      }
137
-      elseif ($last_active < 60 * 15)
130
+      } elseif ($last_active < 60 * 15)
138 131
       {
139 132
         $tmp = "yellow>{$lang['ali_lessThen15min']}";
140
-      }
141
-      else
133
+      } else
142 134
       {
143 135
         $tmp = "red>{$lang['Off']}";
144 136
       }
145
-    }
146
-    else
137
+    } else
147 138
     {
148 139
       $sort1 = max($sort1, 4);
149 140
       $tmp = "orange>-";
Please login to merge, or discard this patch.
includes/alliance/ali_external_request.inc 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
   if($user_request['request_denied'])
24 24
   {
25 25
     $lang['request_text'] = sprintf($lang['ali_req_deny_msg'], $ally['ally_tag'], $user_request['request_text']);
26
-  }
27
-  else
26
+  } else
28 27
   {
29 28
     $lang['request_text'] = sprintf($lang['ali_req_waiting'], $ally['ally_tag']);
30 29
   }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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('SN_IN_ALLY') || SN_IN_ALLY !== true)
3
+if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true)
4 4
 {
5 5
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
6 6
 }
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     sys_redirect('alliance.php');
21 21
   }
22 22
 
23
-  if($user_request['request_denied'])
23
+  if ($user_request['request_denied'])
24 24
   {
25 25
     $lang['request_text'] = sprintf($lang['ali_req_deny_msg'], $ally['ally_tag'], $user_request['request_text']);
26 26
   }
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 
44 44
 $ally = doquery("SELECT * FROM {{alliance}} WHERE `id` ='{$id_ally}'", true);
45 45
 
46
-if(!$ally)
46
+if (!$ally)
47 47
 {
48 48
   SnTemplate::messageBox($lang['ali_sys_notFound'], $lang['ali_req_title']);
49 49
 }
50 50
 
51
-if($ally['ally_request_notallow'])
51
+if ($ally['ally_request_notallow'])
52 52
 {
53 53
   SnTemplate::messageBox($lang['ali_req_not_allowed'], $lang['ali_req_title']);
54 54
 }
Please login to merge, or discard this patch.
includes/pages/techtree.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
   global $lang, $user, $planetrow;
15 15
 
16 16
   $tech_tree = array();
17
-  foreach(get_unit_param('techtree') as $unit_group_id => $unit_list)
17
+  foreach (get_unit_param('techtree') as $unit_group_id => $unit_list)
18 18
   {
19 19
     $tech_tree[] = array(
20 20
       'NAME' => $lang['tech'][$unit_group_id],
21 21
       'GROUP_ID' => $unit_group_id,
22 22
     );
23 23
 
24
-    foreach($unit_list as $unit_id)
24
+    foreach ($unit_list as $unit_id)
25 25
     {
26 26
       $sn_data_unit = get_unit_param($unit_id);
27 27
       $level_basic = $sn_data_unit[P_STACKABLE] ? 0 : mrc_get_level($user, $planetrow, $unit_id, false, true);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@
 block discarded – undo
6 6
  * version 2.0 copyright (c) 2012 by Gorlum for http://supernova.ws
7 7
  */
8 8
 
9
-function sn_techtree_view($template = null)
10
-{
9
+function sn_techtree_view($template = null) {
11 10
   global $lang, $user, $planetrow;
12 11
 
13 12
   $tech_tree = array();
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('geoip_status', array(&$result));}
3
+function geoip_status() {return sn_function_call('geoip_status', 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('geoip_ip_info', array($ip, &$result));}
8
+function geoip_ip_info($ip) {return sn_function_call('geoip_ip_info', 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.
search.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
         'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'),
62 62
         'ALLY_TAG' => htmlentities($row['ally_tag'], ENT_COMPAT, 'UTF-8'),
63 63
       ));
64
-    }
65
-    elseif($type=='ally')
64
+    } elseif($type=='ally')
66 65
     {
67 66
       $template->assign_block_vars('search_result', array(
68 67
         'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'),
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 include('common.' . substr(strrchr(__FILE__, '.'), 1));
14 14
 
15
-if(SN::$config->game_mode == GAME_BLITZ) {
15
+if (SN::$config->game_mode == GAME_BLITZ) {
16 16
   SnTemplate::messageBox($lang['sys_blitz_page_disabled'], $lang['sys_error'], 'overview.php', 10);
17 17
   die();
18 18
 }
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 $template = SnTemplate::gettemplate('search', true);
27 27
 
28
-if($searchtext && $type)
28
+if ($searchtext && $type)
29 29
 {
30
-  switch($type)
30
+  switch ($type)
31 31
   {
32 32
     case "planetname":
33 33
       // $search = db_planet_list_search($searchtext);
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
     break;
44 44
   }
45 45
 
46
-  while($row = db_fetch($search))
46
+  while ($row = db_fetch($search))
47 47
   {
48
-    if($type=='playername' || $type=='planetname')
48
+    if ($type == 'playername' || $type == 'planetname')
49 49
     {
50 50
       $template->assign_block_vars('search_result', array(
51 51
         'PLAYER_ID' => $row['uid'],
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         'ALLY_TAG' => htmlentities($row['ally_tag'], ENT_COMPAT, 'UTF-8'),
63 63
       ));
64 64
     }
65
-    elseif($type=='ally')
65
+    elseif ($type == 'ally')
66 66
     {
67 67
       $template->assign_block_vars('search_result', array(
68 68
         'ALLY_NAME' => htmlentities($row['ally_name'], ENT_COMPAT, 'UTF-8'),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
   'ally' => 'sys_alliance',
82 82
 );
83 83
 
84
-foreach($search_type as $type_id => $type_lang)
84
+foreach ($search_type as $type_id => $type_lang)
85 85
 {
86 86
   $template->assign_block_vars('type', array(
87 87
     'ID' => $type_id,
Please login to merge, or discard this patch.