Completed
Push — work-fleets ( f5fbda...1bdd41 )
by SuperNova.WS
06:04
created
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 1 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.