Completed
Push — work-fleets ( f5fbda...1bdd41 )
by SuperNova.WS
06:04
created
admin/tools.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,19 +12,19 @@  discard block
 block discarded – undo
12 12
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
13 13
 
14 14
 // if($user['authlevel'] < 1)
15
-if($user['authlevel'] < 3) {
15
+if ($user['authlevel'] < 3) {
16 16
   AdminMessage(classLocale::$lang['adm_err_denied']);
17 17
 }
18 18
 
19 19
 $mode = sys_get_param_int('mode');
20 20
 
21
-switch($mode) {
21
+switch ($mode) {
22 22
   case ADM_TOOL_CONFIG_RELOAD:
23 23
     classSupernova::$config->db_loadAll();
24 24
     sys_refresh_tablelist();
25 25
 
26 26
     classSupernova::$config->db_loadItem('game_watchlist');
27
-    if(classSupernova::$config->game_watchlist) {
27
+    if (classSupernova::$config->game_watchlist) {
28 28
       classSupernova::$config->game_watchlist_array = explode(';', classSupernova::$config->game_watchlist);
29 29
     } else {
30 30
       unset(classSupernova::$config->game_watchlist_array);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
       classLocale::$lang['adm_tool_sql_client_version'] => db_get_client_info(),
70 70
       classLocale::$lang['adm_tool_sql_host_info']      => db_get_host_info(),
71 71
     );
72
-    foreach($status as $key => $value) {
72
+    foreach ($status as $key => $value) {
73 73
       $template->assign_block_vars('table.row', array(
74 74
         'VALUE_1' => $key,
75 75
         'VALUE_2' => $value,
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     $template->assign_block_vars('table', classLocale::$lang['adm_tool_sql_table']['status']);
80 80
     $status = explode('  ', db_server_stat());
81
-    foreach($status as $value) {
81
+    foreach ($status as $value) {
82 82
       $row = explode(': ', $value);
83 83
       $template->assign_block_vars('table.row', array(
84 84
         'VALUE_1' => $row[0],
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     $template->assign_block_vars('table', classLocale::$lang['adm_tool_sql_table']['params']);
91 91
     $result = db_core_show_status();
92
-    while($row = db_fetch($result)) {
92
+    while ($row = db_fetch($result)) {
93 93
       $template->assign_block_vars('table.row', array(
94 94
         'VALUE_1' => $row['Variable_name'],
95 95
         'VALUE_2' => $row['Value'],
Please login to merge, or discard this patch.
admin/statbuilder.php 1 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(classLocale::$lang['adm_err_denied']);
21 21
 }
22 22
 
23
-if(SN_TIME_NOW >= classSupernova::$config->db_loadAll('var_stat_update_admin_forced') && SN_TIME_NOW >= classSupernova::$config->db_loadAll('var_stat_update_end'))
23
+if (SN_TIME_NOW >= classSupernova::$config->db_loadAll('var_stat_update_admin_forced') && SN_TIME_NOW >= classSupernova::$config->db_loadAll('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.
admin/settings.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
  * @copyright 2008 by ??????? for XNova
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
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
15 15
 
16
-if($user['authlevel'] < 3) {
16
+if ($user['authlevel'] < 3) {
17 17
   AdminMessage(classLocale::$lang['adm_err_denied']);
18 18
 }
19 19
 
20 20
 $template = gettemplate('admin/settings', true);
21 21
 
22
-if(sys_get_param('save')) {
22
+if (sys_get_param('save')) {
23 23
   classSupernova::$config->game_name               = sys_get_param_str_unsafe('game_name');
24 24
   classSupernova::$config->game_mode               = sys_get_param_int('game_mode');
25 25
   classSupernova::$config->game_speed              = sys_get_param_float('game_speed', 1);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
   classSupernova::$config->url_faq                 = sys_get_param_str_unsafe('url_faq');
30 30
   classSupernova::$config->url_forum               = sys_get_param_str_unsafe('url_forum');
31 31
   classSupernova::$config->url_rules               = sys_get_param_str_unsafe('url_rules');
32
-  classSupernova::$config->url_purchase_metamatter         = sys_get_param_str_unsafe('url_purchase_metamatter');
32
+  classSupernova::$config->url_purchase_metamatter = sys_get_param_str_unsafe('url_purchase_metamatter');
33 33
   classSupernova::$config->game_disable            = sys_get_param_int('game_disable');
34 34
   classSupernova::$config->game_disable_reason     = sys_get_param_str_unsafe('game_disable_reason');
35 35
   classSupernova::$config->server_updater_check_auto = sys_get_param_int('server_updater_check_auto');
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
   classSupernova::$config->stats_schedule          = sys_get_param_str('stats_schedule');
97 97
 
98 98
   classSupernova::$config->empire_mercenary_base_period = sys_get_param_int('empire_mercenary_base_period');
99
-  if(classSupernova::$config->empire_mercenary_temporary != sys_get_param_int('empire_mercenary_temporary')) {
100
-    if(classSupernova::$config->empire_mercenary_temporary) {
99
+  if (classSupernova::$config->empire_mercenary_temporary != sys_get_param_int('empire_mercenary_temporary')) {
100
+    if (classSupernova::$config->empire_mercenary_temporary) {
101 101
       db_unit_list_admin_delete_mercenaries_finished();
102 102
     } else {
103 103
       db_unit_list_admin_set_mercenaries_expire_time(classSupernova::$config->empire_mercenary_base_period);
@@ -138,21 +138,21 @@  discard block
 block discarded – undo
138 138
   'STATS_HIDE_PM_LINK' => classSupernova::$config->stats_hide_pm_link,
139 139
 ));
140 140
 
141
-foreach(classLocale::$lang['sys_game_disable_reason'] as $id => $name) {
141
+foreach (classLocale::$lang['sys_game_disable_reason'] as $id => $name) {
142 142
   $template->assign_block_vars('sys_game_disable_reason', array(
143 143
     'ID'   => $id,
144 144
     'NAME' => $name,
145 145
   ));
146 146
 }
147 147
 
148
-foreach(classLocale::$lang['sys_game_mode'] as $mode_id => $mode_name) {
148
+foreach (classLocale::$lang['sys_game_mode'] as $mode_id => $mode_name) {
149 149
   $template->assign_block_vars('game_modes', array(
150 150
     'ID'   => $mode_id,
151 151
     'NAME' => $mode_name,
152 152
   ));
153 153
 }
154 154
 
155
-foreach(classLocale::$lang['adm_opt_ver_response'] as $ver_id => $ver_response) {
155
+foreach (classLocale::$lang['adm_opt_ver_response'] as $ver_id => $ver_response) {
156 156
   $template->assign_block_vars('ver_response', array(
157 157
     'ID'   => $ver_id,
158 158
     'NAME' => js_safe_string($ver_response),
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 }
161 161
 
162 162
 $lang_list = lng_get_list();
163
-foreach($lang_list as $lang_id => $lang_data) {
163
+foreach ($lang_list as $lang_id => $lang_data) {
164 164
   $template->assign_block_vars('game_languages', array(
165 165
     'ID'   => $lang_id,
166 166
     'NAME' => "{$lang_data['LANG_NAME_NATIVE']} ({$lang_data['LANG_NAME_ENGLISH']})",
Please login to merge, or discard this patch.
ajax_version_check.php 2 patches
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,15 +13,15 @@
 block discarded – undo
13 13
   . '&id=' . urlencode(classSupernova::$config->server_updater_id);
14 14
 
15 15
 switch($mode) {
16
-  case SNC_MODE_REGISTER:
17
-    if(classSupernova::$config->server_updater_key || classSupernova::$config->server_updater_id) {
18
-      if($ajax) {
19
-        print(SNC_VER_REGISTER_ERROR_REGISTERED);
16
+    case SNC_MODE_REGISTER:
17
+      if(classSupernova::$config->server_updater_key || classSupernova::$config->server_updater_id) {
18
+        if($ajax) {
19
+          print(SNC_VER_REGISTER_ERROR_REGISTERED);
20
+        }
21
+        die();
20 22
       }
21
-      die();
22
-    }
23
-    $url .= "&name=" . urlencode(classSupernova::$config->game_name) . "&url=" . urlencode(SN_ROOT_VIRTUAL);
24
-  break;
23
+      $url .= "&name=" . urlencode(classSupernova::$config->game_name) . "&url=" . urlencode(SN_ROOT_VIRTUAL);
24
+    break;
25 25
 }
26 26
 
27 27
 $check_result = sn_get_url_contents($url);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
   . '&key=' . urlencode(classSupernova::$config->server_updater_key)
13 13
   . '&id=' . urlencode(classSupernova::$config->server_updater_id);
14 14
 
15
-switch($mode) {
15
+switch ($mode) {
16 16
   case SNC_MODE_REGISTER:
17
-    if(classSupernova::$config->server_updater_key || classSupernova::$config->server_updater_id) {
18
-      if($ajax) {
17
+    if (classSupernova::$config->server_updater_key || classSupernova::$config->server_updater_id) {
18
+      if ($ajax) {
19 19
         print(SNC_VER_REGISTER_ERROR_REGISTERED);
20 20
       }
21 21
       die();
@@ -25,18 +25,18 @@  discard block
 block discarded – undo
25 25
 }
26 26
 
27 27
 $check_result = sn_get_url_contents($url);
28
-if(!$check_result) {
28
+if (!$check_result) {
29 29
   $version_check = SNC_VER_ERROR_CONNECT;
30
-} elseif(($version_check = intval($check_result)) && $version_check == $check_result) {
30
+} elseif (($version_check = intval($check_result)) && $version_check == $check_result) {
31 31
   $version_check = $check_result;
32 32
 } else {
33 33
   // JSON decode if string
34 34
   $check_result = json_decode($check_result, true);
35 35
   $version_check = $check_result === null ? SNC_VER_UNKNOWN_RESPONSE : $check_result['version_check'];
36 36
 
37
-  switch($mode) {
37
+  switch ($mode) {
38 38
     case SNC_MODE_REGISTER:
39
-      if($check_result['site']['site_key'] && $check_result['site']['site_id'] && $check_result['site']['result'] == SNC_VER_REGISTER_REGISTERED) {
39
+      if ($check_result['site']['site_key'] && $check_result['site']['site_id'] && $check_result['site']['result'] == SNC_VER_REGISTER_REGISTERED) {
40 40
         classSupernova::$config->db_saveItem('server_updater_key', $check_result['site']['site_key']);
41 41
         classSupernova::$config->db_saveItem('server_updater_id', $check_result['site']['site_id']);
42 42
       }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 classSupernova::$config->db_saveItem('server_updater_check_last', SN_TIME_NOW);
50 50
 classSupernova::$config->db_saveItem('server_updater_check_result', $version_check);
51 51
 
52
-if($ajax) {
52
+if ($ajax) {
53 53
   define('IN_AJAX', true);
54 54
   print($version_check);
55 55
 }
Please login to merge, or discard this patch.