Passed
Push — master ( bc874f...230097 )
by SuperNova.WS
04:01
created
admin/banned.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 $action = sys_get_param_str('action');
28 28
 
29 29
 $player_banned_row = db_user_by_username($name_unsafe);
30
-if($mode == 'banit' && $action)
30
+if ($mode == 'banit' && $action)
31 31
 {
32
-  if($player_banned_row)
32
+  if ($player_banned_row)
33 33
   {
34 34
     $reas = $_POST['why'];
35 35
     $days = $_POST['days'];
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     $DoneMessage = "{$lang['adm_bn_thpl']} {$name_output} {$lang['adm_bn_isbn']}";
50 50
 
51
-    if($is_vacation)
51
+    if ($is_vacation)
52 52
     {
53 53
       $DoneMessage .= $lang['adm_bn_vctn'];
54 54
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
   AdminMessage($DoneMessage, $lang['adm_ban_title']);
64 64
 }
65
-elseif($mode == 'unbanit' && $action)
65
+elseif ($mode == 'unbanit' && $action)
66 66
 {
67 67
   sys_admin_player_ban_unset($user, $player_banned_row, ($reason = sys_get_param_str('why')) ? $reason : $lang['sys_unbanned']);
68 68
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,15 +54,13 @@
 block discarded – undo
54 54
     }
55 55
 
56 56
     $DoneMessage .= $lang['adm_bn_plnt'];
57
-  }
58
-  else
57
+  } else
59 58
   {
60 59
     $DoneMessage = sprintf($lang['adm_bn_errr'], $name_output);
61 60
   }
62 61
 
63 62
   AdminMessage($DoneMessage, $lang['adm_ban_title']);
64
-}
65
-elseif($mode == 'unbanit' && $action)
63
+} elseif($mode == 'unbanit' && $action)
66 64
 {
67 65
   sys_admin_player_ban_unset($user, $player_banned_row, ($reason = sys_get_param_str('why')) ? $reason : $lang['sys_unbanned']);
68 66
 
Please login to merge, or discard this patch.
admin/add_moon.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
15 15
 
16 16
 // if ($user['authlevel'] < 2)
17
-if($user['authlevel'] < 3)
17
+if ($user['authlevel'] < 3)
18 18
 {
19 19
   AdminMessage($lang['adm_err_denied']);
20 20
 }
21 21
 
22 22
 $template = gettemplate("admin/add_moon", true);
23 23
 
24
-if(sys_get_param_str('mode') == 'addit')
24
+if (sys_get_param_str('mode') == 'addit')
25 25
 {
26 26
   $PlanetID = sys_get_param_id('user');
27 27
   $MoonName = sys_get_param_str('name');
Please login to merge, or discard this patch.
admin/adm_planet_list.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-define('INSIDE'  , true);
4
-define('INSTALL' , false);
3
+define('INSIDE', true);
4
+define('INSTALL', false);
5 5
 define('IN_ADMIN', true);
6 6
 
7 7
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
 global $config, $lang, $user;
10 10
 
11 11
 // if($user['authlevel'] < 1)
12
-if($user['authlevel'] < 3) {
12
+if ($user['authlevel'] < 3) {
13 13
   AdminMessage($lang['adm_err_denied']);
14 14
 }
15 15
 
16 16
 $planet_active = sys_get_param_int('planet_active');
17
-if(!$planet_active) {
17
+if (!$planet_active) {
18 18
   $planet_type = sys_get_param_int('planet_type', 1);
19 19
   $planet_type = $planet_type == 3 ? 3 : 1;
20 20
 } else {
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 $page_title = 
45 45
   $lang['adm_planet_list_title'] . ': ' . 
46
-  ($planet_active ? $lang['adm_planet_active'] :
47
-    ($planet_type ? ($planet_type == 3 ? $lang['sys_moons'] : $lang['sys_planets']) : '')
46
+  ($planet_active ? $lang['adm_planet_active'] : ($planet_type ? ($planet_type == 3 ? $lang['sys_moons'] : $lang['sys_planets']) : '')
48 47
   );
49 48
 $template->assign_vars(array(
50 49
   'PAGE_TITLE' => $page_title,
Please login to merge, or discard this patch.
admin/adm_log_main.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,26 +19,26 @@  discard block
 block discarded – undo
19 19
   AdminMessage($lang['adm_err_denied']);
20 20
 }
21 21
 
22
-if($delete = sys_get_param_id('delete'))
22
+if ($delete = sys_get_param_id('delete'))
23 23
 {
24 24
   doquery("DELETE FROM `{{logs}}` WHERE `log_id` = {$delete} LIMIT 1;");
25 25
 }
26
-elseif(sys_get_param_str('delete_update_info'))
26
+elseif (sys_get_param_str('delete_update_info'))
27 27
 {
28 28
   doquery("DELETE FROM `{{logs}}` WHERE `log_code` in (103, 180, 191);");
29 29
 }
30
-elseif(sys_get_param_str('deleteall') == 'yes')
30
+elseif (sys_get_param_str('deleteall') == 'yes')
31 31
 {
32 32
 //  doquery("TRUNCATE TABLE `{{logs}}`");
33 33
 }
34 34
 
35
-if($detail = sys_get_param_id('detail'))
35
+if ($detail = sys_get_param_id('detail'))
36 36
 {
37 37
   $template = gettemplate('admin/adm_log_main_detail', true);
38 38
 
39 39
   $errorInfo = doquery("SELECT * FROM `{{logs}}` WHERE `log_id` = {$detail} LIMIT 1;", true);
40 40
   $error_dump = unserialize($errorInfo['log_dump']);
41
-  if(is_array($error_dump))
41
+  if (is_array($error_dump))
42 42
   {
43 43
     foreach ($error_dump as $key => $value)
44 44
     {
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 
59 59
   $i = 0;
60 60
   $query = doquery("SELECT * FROM `{{logs}}` ORDER BY log_id DESC LIMIT 100;");
61
-  while($u = db_fetch($query))
61
+  while ($u = db_fetch($query))
62 62
   {
63 63
     $i++;
64 64
     $v = array();
65
-    foreach($u as $key => $value)
65
+    foreach ($u as $key => $value)
66 66
     {
67 67
       $v[strtoupper($key)] = $value;
68 68
     }
Please login to merge, or discard this patch.
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.
admin/adm_payment.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,18 +14,18 @@  discard block
 block discarded – undo
14 14
 
15 15
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
16 16
 
17
-if($user['authlevel'] < 3)
17
+if ($user['authlevel'] < 3)
18 18
 {
19 19
   AdminMessage($lang['adm_err_denied']);
20 20
 }
21 21
 
22
-$template  = gettemplate('admin/adm_payment', true);
22
+$template = gettemplate('admin/adm_payment', true);
23 23
 
24 24
 $payer_list = array(
25 25
   -1 => $lang['adm_pay_filter_all'],
26 26
 );
27 27
 $query = doquery("SELECT payment_user_id, payment_user_name FROM {{payment}} GROUP BY payment_user_id ORDER BY payment_user_name");
28
-while($row = db_fetch($query)) {
28
+while ($row = db_fetch($query)) {
29 29
   $payer_list[$row['payment_user_id']] = '[' . $row['payment_user_id'] . '] ' . $row['payment_user_name'];
30 30
 }
31 31
 tpl_assign_select($template, 'payer', $payer_list);
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
   '' => $lang['adm_pay_filter_all'],
35 35
 );
36 36
 $query = doquery("SELECT distinct payment_module_name FROM {{payment}} ORDER BY payment_module_name");
37
-while($row = db_fetch($query)) {
37
+while ($row = db_fetch($query)) {
38 38
   $module_list[$row['payment_module_name']] = $row['payment_module_name'];
39 39
 }
40 40
 tpl_assign_select($template, 'module', $module_list);
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 ($flt_module ? "AND payment_module_name = '{$flt_module}' " : '') .
55 55
 "ORDER BY payment_id desc");
56 56
 
57
-while($row = db_fetch($query)) {
57
+while ($row = db_fetch($query)) {
58 58
   $row2 = array();
59
-  foreach($row as $key => $value) {
59
+  foreach ($row as $key => $value) {
60 60
     $row2[strtoupper($key)] = $value;
61 61
   }
62 62
   $template->assign_block_vars('payment', $row2);
Please login to merge, or discard this patch.
admin/adm_message_list.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  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));
16 16
 
17
-if($user['authlevel'] < 3)
17
+if ($user['authlevel'] < 3)
18 18
 {
19 19
   AdminMessage($lang['adm_err_denied']);
20 20
 }
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
   ),
30 30
 );
31 31
 $template->assign_block_vars('int_type_selected', $allowed_types[-1]);
32
-foreach($sn_message_class_list as $key => $value)
32
+foreach ($sn_message_class_list as $key => $value)
33 33
 {
34
-  if($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX)
34
+  if ($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX)
35 35
   {
36 36
     continue;
37 37
   }
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
 
45 45
 
46 46
 $message_delete = sys_get_param_id('msg_del');
47
-if(sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete))
47
+if (sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete))
48 48
 {
49 49
   $message_delete = implode(', ', $message_delete);
50 50
 }
51 51
 
52
-if($message_delete)
52
+if ($message_delete)
53 53
 {
54 54
   doquery("DELETE FROM {{messages}} WHERE `message_id` in ({$message_delete});");
55 55
   $template->assign_block_vars('result', array('MESSAGE' => sprintf($lang['mlst_messages_deleted'], $message_delete)));
56 56
 }
57 57
 
58 58
 
59
-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
+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')))
60 60
 {
61 61
   $delete_date = "{$year}-{$month}-{$day}";
62 62
   doquery("DELETE FROM {{messages}} WHERE message_time <= UNIX_TIMESTAMP('{$delete_date}')" . ($int_type_selected >= 0 ? " AND `message_type` = {$int_type_selected}" : ''));
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
 
70 70
 $int_page_current = min(sys_get_param_id('int_page_current', 1), $page_max);
71 71
 
72
-if(sys_get_param('page_prev') && $int_page_current > 1)
72
+if (sys_get_param('page_prev') && $int_page_current > 1)
73 73
 {
74 74
   $int_page_current--;
75 75
 }
76
-elseif(sys_get_param('page_next') && $int_page_current < $page_max)
76
+elseif (sys_get_param('page_next') && $int_page_current < $page_max)
77 77
 {
78 78
   $int_page_current++;
79 79
 }
80 80
 
81
-for($i = 1; $i <= $page_max; $i++)
81
+for ($i = 1; $i <= $page_max; $i++)
82 82
 {
83 83
   $template->assign_block_vars('page', array('NUMBER' => $i));
84 84
 }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 $StartRec = ($int_page_current - 1) * 25;
149 149
 
150 150
 $Messages = db_message_list_admin_by_type($int_type_selected, $StartRec);
151
-while($row = db_fetch($Messages))
151
+while ($row = db_fetch($Messages))
152 152
 {
153 153
   $row['FROM'] = htmlentities($row['FROM'], ENT_COMPAT, 'UTF-8');
154 154
   $row['OWNER_NAME'] = htmlentities($row['OWNER_NAME'], ENT_COMPAT, 'UTF-8');
Please login to merge, or discard this patch.
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.
admin/adm_quest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-define('INSIDE'  , true);
11
-define('INSTALL' , false);
12
-define('IN_ADMIN'  , true);
10
+define('INSIDE', true);
11
+define('INSTALL', false);
12
+define('IN_ADMIN', true);
13 13
 
14 14
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
15 15
 
16
-if($user['authlevel'] < 2)
16
+if ($user['authlevel'] < 2)
17 17
 {
18 18
   AdminMessage($lang['adm_err_denied']);
19 19
 }
Please login to merge, or discard this patch.
admin/includes/admin_planet_edit.inc.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list){return sn_function_call('admin_planet_edit_mode', array(&$template, &$admin_planet_edit_mode_list));}
3
+function admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list) {return sn_function_call('admin_planet_edit_mode', array(&$template, &$admin_planet_edit_mode_list)); }
4 4
 function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list)
5 5
 {
6 6
   global $lang;
@@ -19,19 +19,19 @@  discard block
 block discarded – undo
19 19
   return $mode;
20 20
 }
21 21
 
22
-function admin_planet_edit_template(&$template, $edit_planet_row, $mode){return sn_function_call('admin_planet_edit_template', array(&$template, $edit_planet_row, $mode));}
22
+function admin_planet_edit_template(&$template, $edit_planet_row, $mode) {return sn_function_call('admin_planet_edit_template', array(&$template, $edit_planet_row, $mode)); }
23 23
 function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode)
24 24
 {
25 25
   global $lang;
26 26
 
27 27
   $unit_list = sn_get_groups($mode);
28
-  if(empty($unit_list))
28
+  if (empty($unit_list))
29 29
   {
30 30
     return;
31 31
   }
32 32
   $name_list = $lang['tech'];
33 33
 
34
-  foreach($unit_list as $unit_id)
34
+  foreach ($unit_list as $unit_id)
35 35
   {
36 36
     $template->assign_block_vars('unit', array(
37 37
       'ID'    => $unit_id,
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
   }
43 43
 }
44 44
 
45
-function admin_planet_edit_query_string($unit_id, $unit_amount, $mode){return sn_function_call('admin_planet_edit_query_string', array($unit_id, $unit_amount, $mode));}
45
+function admin_planet_edit_query_string($unit_id, $unit_amount, $mode) {return sn_function_call('admin_planet_edit_query_string', array($unit_id, $unit_amount, $mode)); }
46 46
 function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode)
47 47
 {
48
-  if($unit_amount && in_array($unit_id, sn_get_groups($mode)))
48
+  if ($unit_amount && in_array($unit_id, sn_get_groups($mode)))
49 49
   {
50 50
     $unit_amount = round($unit_amount);
51 51
     $unit_name = get_unit_param($unit_id, P_NAME);
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,8 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 function admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list){return sn_function_call('admin_planet_edit_mode', array(&$template, &$admin_planet_edit_mode_list));}
4
-function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list)
5
-{
4
+function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list) {
6 5
   global $lang;
7 6
 
8 7
   $admin_planet_edit_mode_list = array_merge(isset($admin_planet_edit_mode_list) ? $admin_planet_edit_mode_list : array(), array(
@@ -20,8 +19,7 @@  discard block
 block discarded – undo
20 19
 }
21 20
 
22 21
 function admin_planet_edit_template(&$template, $edit_planet_row, $mode){return sn_function_call('admin_planet_edit_template', array(&$template, $edit_planet_row, $mode));}
23
-function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode)
24
-{
22
+function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode) {
25 23
   global $lang;
26 24
 
27 25
   $unit_list = sn_get_groups($mode);
@@ -43,15 +41,13 @@  discard block
 block discarded – undo
43 41
 }
44 42
 
45 43
 function admin_planet_edit_query_string($unit_id, $unit_amount, $mode){return sn_function_call('admin_planet_edit_query_string', array($unit_id, $unit_amount, $mode));}
46
-function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode)
47
-{
44
+function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode) {
48 45
   if($unit_amount && in_array($unit_id, sn_get_groups($mode)))
49 46
   {
50 47
     $unit_amount = round($unit_amount);
51 48
     $unit_name = get_unit_param($unit_id, P_NAME);
52 49
     $result = "{$unit_name} = GREATEST(0, {$unit_name} + ({$unit_amount}))";
53
-  }
54
-  else
50
+  } else
55 51
   {
56 52
     $result = '';
57 53
   }
Please login to merge, or discard this patch.
admin/statbuilder.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
   </script>';
40 40
 
41 41
   AdminMessage("{$script}<img src=\"design/images/progressbar.gif\"><br>{$lang['sys_wait']}", $lang['adm_stat_title'], '', 120);
42
-}
43
-else
42
+} else
44 43
 {
45 44
   AdminMessage($lang['adm_stat_already_started'], $lang['adm_stat_title'], 'admin/overview.php', 5);
46 45
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,18 +9,18 @@
 block discarded – undo
9 9
  * @copyright 2008 by Chlorel for XNova
10 10
  */
11 11
 
12
-define('INSIDE'  , true);
13
-define('INSTALL' , false);
12
+define('INSIDE', true);
13
+define('INSTALL', false);
14 14
 define('IN_ADMIN', true);
15 15
 require_once('../common.' . substr(strrchr(__FILE__, '.'), 1));
16 16
 
17 17
 // if($user['authlevel'] < 1)
18
-if($user['authlevel'] < 3)
18
+if ($user['authlevel'] < 3)
19 19
 {
20 20
   AdminMessage($lang['adm_err_denied']);
21 21
 }
22 22
 
23
-if(SN_TIME_NOW >= classSupernova::$config->db_loadItem('var_stat_update_admin_forced') && SN_TIME_NOW >= classSupernova::$config->db_loadItem('var_stat_update_end'))
23
+if (SN_TIME_NOW >= classSupernova::$config->db_loadItem('var_stat_update_admin_forced') && SN_TIME_NOW >= classSupernova::$config->db_loadItem('var_stat_update_end'))
24 24
 {
25 25
   classSupernova::$config->db_saveItem('var_stat_update_admin_forced', SN_TIME_NOW + 120);
26 26
 
Please login to merge, or discard this patch.