Completed
Push — work-fleets ( 5fa106...33857b )
by SuperNova.WS
06:09
created
includes/init.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Защита от двойного инита
4
-if(defined('INIT')) {
4
+if (defined('INIT')) {
5 5
   return;
6 6
 }
7 7
 
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
 define('SN_DEBUG_PDUMP_CALLER', true);
20 20
 
21 21
 // Бенчмарк
22
-register_shutdown_function(function () {
23
-  if(defined('IN_AJAX')) {
22
+register_shutdown_function(function() {
23
+  if (defined('IN_AJAX')) {
24 24
     return;
25 25
   }
26 26
 
27 27
   global $user, $locale_cache_statistic;
28 28
 
29
-  print('<hr><div class="benchmark">Benchmark ' . (microtime(true) - SN_TIME_MICRO) . 's, memory: ' . number_format(memory_get_usage() - SN_MEM_START) .
30
-    (!empty($locale_cache_statistic['misses']) ? ', LOCALE MISSED' : '') .
31
-    (class_exists('classSupernova') && is_object(classSupernova::$db) ? ', DB time: ' . classSupernova::$db->time_mysql_total . 'ms' : '') .
29
+  print('<hr><div class="benchmark">Benchmark '.(microtime(true) - SN_TIME_MICRO).'s, memory: '.number_format(memory_get_usage() - SN_MEM_START).
30
+    (!empty($locale_cache_statistic['misses']) ? ', LOCALE MISSED' : '').
31
+    (class_exists('classSupernova') && is_object(classSupernova::$db) ? ', DB time: '.classSupernova::$db->time_mysql_total.'ms' : '').
32 32
     '</div>');
33
-  if($user['authlevel'] >= 2 && file_exists(SN_ROOT_PHYSICAL . 'badqrys.txt') && @filesize(SN_ROOT_PHYSICAL . 'badqrys.txt') > 0) {
33
+  if ($user['authlevel'] >= 2 && file_exists(SN_ROOT_PHYSICAL.'badqrys.txt') && @filesize(SN_ROOT_PHYSICAL.'badqrys.txt') > 0) {
34 34
     echo '<a href="badqrys.txt" target="_blank" style="color:red">', 'HACK ALERT!', '</a>';
35 35
   }
36 36
 
37
-  if(!empty($locale_cache_statistic['misses'])) {
37
+  if (!empty($locale_cache_statistic['misses'])) {
38 38
     print('<!--');
39 39
     pdump($locale_cache_statistic);
40 40
     print('-->');
@@ -54,41 +54,41 @@  discard block
 block discarded – undo
54 54
 
55 55
 define('SN_TIME_NOW_GMT_STRING', gmdate(DATE_ATOM, SN_TIME_NOW));
56 56
 
57
-if(strpos(strtolower($_SERVER['SERVER_NAME']), 'google.') !== false) {
57
+if (strpos(strtolower($_SERVER['SERVER_NAME']), 'google.') !== false) {
58 58
   define('SN_GOOGLE', true);
59 59
 }
60 60
 
61 61
 // Эти три строки должны быть В ЭТОМ ФАЙЛЕ, ПО ЭТОМУ ПУТИ и ПЕРЕД ЭТИМ ИНКЛЮДОМ!!!
62
-define('SN_ROOT_PHYSICAL', str_replace(array('\\', '//'), '/', dirname(__DIR__) . '/'));
62
+define('SN_ROOT_PHYSICAL', str_replace(array('\\', '//'), '/', dirname(__DIR__).'/'));
63 63
 define('SN_ROOT_PHYSICAL_STR_LEN', strlen(SN_ROOT_PHYSICAL));
64 64
 $phpbb_root_path = SN_ROOT_PHYSICAL; // Это нужно для работы PTL
65 65
 
66
-$sn_root_relative = str_replace(array('\\', '//'), '/', getcwd() . '/');
66
+$sn_root_relative = str_replace(array('\\', '//'), '/', getcwd().'/');
67 67
 //$sn_root_relative .= $sn_root_relative[strlen($sn_root_relative) - 1] == '/' ? '' : '/';
68 68
 $sn_root_relative = str_replace(SN_ROOT_PHYSICAL, '', $sn_root_relative);
69 69
 $sn_root_relative .= basename($_SERVER['SCRIPT_NAME']);
70 70
 $sn_root_relative = str_replace($sn_root_relative, '', $_SERVER['SCRIPT_NAME']);
71 71
 define('SN_ROOT_RELATIVE', $sn_root_relative);
72 72
 
73
-define('SN_ROOT_VIRTUAL', 'http' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . SN_ROOT_RELATIVE);
73
+define('SN_ROOT_VIRTUAL', 'http'.(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '').'://'.$_SERVER['HTTP_HOST'].SN_ROOT_RELATIVE);
74 74
 define('SN_ROOT_VIRTUAL_PARENT', str_replace('//google.', '//', SN_ROOT_VIRTUAL));
75 75
 
76 76
 $phpEx = strpos($phpEx = substr(strrchr(__FILE__, '.'), 1), '/') === false ? $phpEx : '';
77 77
 define('PHP_EX', $phpEx); // PHP extension on this server
78
-define('DOT_PHP_EX', '.' . PHP_EX); // PHP extension on this server
78
+define('DOT_PHP_EX', '.'.PHP_EX); // PHP extension on this server
79 79
 
80 80
 
81 81
 header('Content-type: text/html; charset=utf-8');
82 82
 ob_start();
83 83
 ini_set('error_reporting', E_ALL ^ E_NOTICE);
84 84
 
85
-empty($classRoot) ? $classRoot = SN_ROOT_PHYSICAL . 'includes/classes/' : false;
86
-spl_autoload_register(function ($class) use ($classRoot) {
85
+empty($classRoot) ? $classRoot = SN_ROOT_PHYSICAL.'includes/classes/' : false;
86
+spl_autoload_register(function($class) use ($classRoot) {
87 87
   $class = str_replace('\\', '/', $class);
88
-  if (file_exists($classRoot . $class . '.php')) {
89
-    require_once $classRoot . $class . '.php';
90
-  } elseif (file_exists($classRoot . 'UBE/' . $class . '.php')) {
91
-    require_once $classRoot . 'UBE/' . $class . '.php';
88
+  if (file_exists($classRoot.$class.'.php')) {
89
+    require_once $classRoot.$class.'.php';
90
+  } elseif (file_exists($classRoot.'UBE/'.$class.'.php')) {
91
+    require_once $classRoot.'UBE/'.$class.'.php';
92 92
   }
93 93
 });
94 94
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 // Initializing global 'debug' object
107 107
 classSupernova::$debug = new debug();
108 108
 
109
-require_once(SN_ROOT_PHYSICAL . "includes/db" . DOT_PHP_EX);
109
+require_once(SN_ROOT_PHYSICAL."includes/db".DOT_PHP_EX);
110 110
 classSupernova::init_main_db(new db_mysql());
111 111
 
112 112
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 //require_once('classes/sn_module.php');
117 117
 
118 118
 //require_once('classes/userOptions.php');
119
-require_once(SN_ROOT_PHYSICAL . "includes/init/init_functions" . DOT_PHP_EX);
119
+require_once(SN_ROOT_PHYSICAL."includes/init/init_functions".DOT_PHP_EX);
120 120
 
121 121
 /**
122 122
  * @var classConfig    $config
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
 // define('BE_DEBUG', true); // Отладка боевого движка
130 130
 classSupernova::init_debug_state();
131 131
 
132
-require_once(SN_ROOT_PHYSICAL . "includes/vars/vars" . DOT_PHP_EX);
133
-require_once(SN_ROOT_PHYSICAL . "includes/general" . DOT_PHP_EX);
132
+require_once(SN_ROOT_PHYSICAL."includes/vars/vars".DOT_PHP_EX);
133
+require_once(SN_ROOT_PHYSICAL."includes/general".DOT_PHP_EX);
134 134
 
135 135
 init_update();
136 136
 
@@ -139,28 +139,28 @@  discard block
 block discarded – undo
139 139
   ? trim(strip_tags($_GET['page']))
140 140
   : str_replace(DOT_PHP_EX, '', str_replace(SN_ROOT_RELATIVE, '', str_replace('\\', '/', $_SERVER['SCRIPT_NAME'])));
141 141
 define('INITIAL_PAGE', $sn_page_name_original);
142
-define('SN_COOKIE', (classSupernova::$config->COOKIE_NAME ? classSupernova::$config->COOKIE_NAME : 'SuperNova') . (defined('SN_GOOGLE') ? '_G' : ''));
143
-define('SN_COOKIE_I', SN_COOKIE . AUTH_COOKIE_IMPERSONATE_SUFFIX);
144
-define('SN_COOKIE_D', SN_COOKIE . '_D');
145
-define('SN_COOKIE_T', SN_COOKIE . '_T'); // Time measure cookie
146
-define('SN_COOKIE_F', SN_COOKIE . '_F'); // Font size cookie
147
-define('SN_COOKIE_U', SN_COOKIE . '_U'); // Current user cookie aka user ID
148
-define('SN_COOKIE_U_I', SN_COOKIE_U . AUTH_COOKIE_IMPERSONATE_SUFFIX); // Current impersonator user cookie aka impersonator user ID
142
+define('SN_COOKIE', (classSupernova::$config->COOKIE_NAME ? classSupernova::$config->COOKIE_NAME : 'SuperNova').(defined('SN_GOOGLE') ? '_G' : ''));
143
+define('SN_COOKIE_I', SN_COOKIE.AUTH_COOKIE_IMPERSONATE_SUFFIX);
144
+define('SN_COOKIE_D', SN_COOKIE.'_D');
145
+define('SN_COOKIE_T', SN_COOKIE.'_T'); // Time measure cookie
146
+define('SN_COOKIE_F', SN_COOKIE.'_F'); // Font size cookie
147
+define('SN_COOKIE_U', SN_COOKIE.'_U'); // Current user cookie aka user ID
148
+define('SN_COOKIE_U_I', SN_COOKIE_U.AUTH_COOKIE_IMPERSONATE_SUFFIX); // Current impersonator user cookie aka impersonator user ID
149 149
 define('TEMPLATE_NAME', classSupernova::$config->game_default_template ? classSupernova::$config->game_default_template : 'OpenGame');
150
-define('TEMPLATE_PATH', 'design/templates/' . TEMPLATE_NAME);
151
-define('TEMPLATE_DIR', SN_ROOT_PHYSICAL . TEMPLATE_PATH);
150
+define('TEMPLATE_PATH', 'design/templates/'.TEMPLATE_NAME);
151
+define('TEMPLATE_DIR', SN_ROOT_PHYSICAL.TEMPLATE_PATH);
152 152
 define('DEFAULT_SKINPATH', classSupernova::$config->game_default_skin ? classSupernova::$config->game_default_skin : 'skins/EpicBlue/');
153 153
 define('DEFAULT_LANG', classSupernova::$config->game_default_language ? classSupernova::$config->game_default_language : 'ru');
154 154
 define('FMT_DATE', classSupernova::$config->int_format_date ? classSupernova::$config->int_format_date : 'd.m.Y');
155 155
 define('FMT_TIME', classSupernova::$config->int_format_time ? classSupernova::$config->int_format_time : 'H:i:s');
156
-define('FMT_DATE_TIME', FMT_DATE . ' ' . FMT_TIME);
156
+define('FMT_DATE_TIME', FMT_DATE.' '.FMT_TIME);
157 157
 
158 158
 $HTTP_ACCEPT_LANGUAGE = DEFAULT_LANG;
159 159
 
160
-require_once(SN_ROOT_PHYSICAL . "includes/template" . DOT_PHP_EX);
160
+require_once(SN_ROOT_PHYSICAL."includes/template".DOT_PHP_EX);
161 161
 $template_result = array('.' => array('result' => array()));
162 162
 
163
-sn_sys_load_php_files(SN_ROOT_PHYSICAL . "includes/functions/", PHP_EX);
163
+sn_sys_load_php_files(SN_ROOT_PHYSICAL."includes/functions/", PHP_EX);
164 164
 
165 165
 
166 166
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 // Конфиг - часть манифеста?
173 173
 classSupernova::$auth = new core_auth();
174 174
 
175
-sn_sys_load_php_files(SN_ROOT_PHYSICAL . "modules/", PHP_EX, true);
175
+sn_sys_load_php_files(SN_ROOT_PHYSICAL."modules/", PHP_EX, true);
176 176
 // Здесь - потому что core_auth модуль лежит в другом каталоге и его нужно инициализировать отдельно
177 177
 
178 178
 // Подключаем дефолтную страницу
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
 // Сейчас мы делаем это здесь только для того, что бы содержание дефолтной страницы оказалось вверху. Что не факт, что нужно всегда
181 181
 // Но нужно, пока у нас есть не MVC-страницы
182 182
 $sn_page_data = $sn_data['pages'][$sn_page_name];
183
-$sn_page_name_file = 'includes/pages/' . $sn_page_data['filename'] . DOT_PHP_EX;
184
-if($sn_page_name && isset($sn_page_data) && file_exists($sn_page_name_file)) {
183
+$sn_page_name_file = 'includes/pages/'.$sn_page_data['filename'].DOT_PHP_EX;
184
+if ($sn_page_name && isset($sn_page_data) && file_exists($sn_page_name_file)) {
185 185
   require_once($sn_page_name_file);
186
-  if(is_array($sn_page_data['options'])) {
186
+  if (is_array($sn_page_data['options'])) {
187 187
     classSupernova::$options = array_merge(classSupernova::$options, $sn_page_data['options']);
188 188
   }
189 189
 }
@@ -198,10 +198,10 @@  discard block
 block discarded – undo
198 198
 $load_order = array();
199 199
 $sn_req = array();
200 200
 
201
-foreach(sn_module::$sn_module as $loaded_module_name => $module_data) {
201
+foreach (sn_module::$sn_module as $loaded_module_name => $module_data) {
202 202
   $load_order[$loaded_module_name] = isset($module_data->manifest['load_order']) && !empty($module_data->manifest['load_order']) ? $module_data->manifest['load_order'] : 100000;
203
-  if(isset($module_data->manifest['require']) && !empty($module_data->manifest['require'])) {
204
-    foreach($module_data->manifest['require'] as $require_name) {
203
+  if (isset($module_data->manifest['require']) && !empty($module_data->manifest['require'])) {
204
+    foreach ($module_data->manifest['require'] as $require_name) {
205 205
       $sn_req[$loaded_module_name][$require_name] = 0;
206 206
     }
207 207
   }
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 do {
215 215
   $prev_order = $load_order;
216 216
 
217
-  foreach($sn_req as $loaded_module_name => &$req_data) {
217
+  foreach ($sn_req as $loaded_module_name => &$req_data) {
218 218
     $level = 1;
219
-    foreach($req_data as $req_name => &$req_level) {
220
-      if($load_order[$req_name] == -1 || !isset($load_order[$req_name])) {
219
+    foreach ($req_data as $req_name => &$req_level) {
220
+      if ($load_order[$req_name] == -1 || !isset($load_order[$req_name])) {
221 221
         $level = $req_level = -1;
222 222
         break;
223 223
       } else {
@@ -225,20 +225,20 @@  discard block
 block discarded – undo
225 225
       }
226 226
       $req_level = $load_order[$req_name];
227 227
     }
228
-    if($level > $load_order[$loaded_module_name] || $level == -1) {
228
+    if ($level > $load_order[$loaded_module_name] || $level == -1) {
229 229
       $load_order[$loaded_module_name] = $level;
230 230
     }
231 231
   }
232
-} while($prev_order != $load_order);
232
+} while ($prev_order != $load_order);
233 233
 
234 234
 asort($load_order);
235 235
 
236 236
 // Инициализируем модули
237 237
 // По нормальным делам это должна быть загрузка модулей и лишь затем инициализация - что бы минимизировать размер процесса в памяти
238
-foreach($load_order as $loaded_module_name => $load_order_order) {
239
-  if($load_order_order >= 0) {
238
+foreach ($load_order as $loaded_module_name => $load_order_order) {
239
+  if ($load_order_order >= 0) {
240 240
     sn_module::$sn_module[$loaded_module_name]->check_status();
241
-    if(!sn_module::$sn_module[$loaded_module_name]->manifest['active']) {
241
+    if (!sn_module::$sn_module[$loaded_module_name]->manifest['active']) {
242 242
       unset(sn_module::$sn_module[$loaded_module_name]);
243 243
       continue;
244 244
     }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 unset($sn_req);
256 256
 
257 257
 // А теперь проверяем - поддерживают ли у нас загруженный код такую страницу
258
-if(!isset($sn_data['pages'][$sn_page_name])) {
258
+if (!isset($sn_data['pages'][$sn_page_name])) {
259 259
   $sn_page_name = '';
260 260
 }
261 261
 
@@ -263,6 +263,6 @@  discard block
 block discarded – undo
263 263
 classLocale::$lang = $lang = new classLocale(classSupernova::$config->server_locale_log_usage);
264 264
 classLocale::$lang->lng_switch(sys_get_param_str('lang'));
265 265
 
266
-if(!defined('DEBUG_INIT_SKIP_SECONDARY') || DEBUG_INIT_SKIP_SECONDARY !== true) {
266
+if (!defined('DEBUG_INIT_SKIP_SECONDARY') || DEBUG_INIT_SKIP_SECONDARY !== true) {
267 267
   require_once "init_secondary.php";
268 268
 }
Please login to merge, or discard this patch.
includes/classes/oldArrayAccessNd.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
     !is_array($offset) ? $offset = array($offset) : false;
39 39
 
40 40
     $current_leaf = $this->__get(reset($offset));
41
-    while(($leaf_index = next($offset)) !== false) {
42
-      if(!isset($current_leaf) || !is_array($current_leaf) || !isset($current_leaf[$leaf_index])) {
41
+    while (($leaf_index = next($offset)) !== false) {
42
+      if (!isset($current_leaf) || !is_array($current_leaf) || !isset($current_leaf[$leaf_index])) {
43 43
         unset($current_leaf);
44 44
         break;
45 45
       }
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 
65 65
     !is_array($offset) ? $offset = array($offset) : false;
66 66
 
67
-    if($this->offsetExists($offset)) {
67
+    if ($this->offsetExists($offset)) {
68 68
       $result = $this->__get(reset($offset));
69
-      while(($leaf_index = next($offset)) !== false) {
69
+      while (($leaf_index = next($offset)) !== false) {
70 70
         $result = $result[$leaf_index];
71 71
       }
72 72
     }
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
    */
92 92
   public function offsetSet($offset, $value = null) {
93 93
     // Если нет никакого индекса - значит нечего записывать
94
-    if(!isset($offset) || (is_array($offset) && empty($offset))) {
94
+    if (!isset($offset) || (is_array($offset) && empty($offset))) {
95 95
       return;
96 96
     }
97 97
 
98 98
     // Если в массиве индекса только один элемент - значит это просто индекс
99
-    if(is_array($offset) && count($offset) == 1) {
99
+    if (is_array($offset) && count($offset) == 1) {
100 100
       // Разворачиваем его в индекс
101 101
       $offset = array(reset($offset) => $value);
102 102
       unset($value);
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
     }
105 105
 
106 106
     // Адресация многомерного массива через массив индексов в $option
107
-    if(is_array($offset) && isset($value)) {
107
+    if (is_array($offset) && isset($value)) {
108 108
       // TODO - а не переделать ли это всё на __isset() ??
109 109
 //pdump($offset, '$offset');
110 110
 //pdump($value, '$value');
111 111
       // Вытаскиваем корневой элемент
112 112
       $root = $this->__get(reset($offset));
113 113
       $current_leaf = &$root;
114
-      while(($leaf_index = next($offset)) !== false) {
114
+      while (($leaf_index = next($offset)) !== false) {
115 115
         !is_array($current_leaf[$leaf_index]) ? $current_leaf[$leaf_index] = array() : false;
116 116
         $current_leaf = &$current_leaf[$leaf_index];
117 117
       }
118 118
 //pdump($current_leaf, '$current_leaf');
119 119
 //pdump($value, '$value');
120
-      if($current_leaf != $value) {
120
+      if ($current_leaf != $value) {
121 121
         $current_leaf = $value;
122 122
 //pdump(reset($offset), 'reset($offset)');
123 123
 //pdump($root, '$root');
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
       // Пакетная запись из массива ключ -> значение
129 129
       !is_array($offset) ? $offset = array($offset => $value) : false;
130 130
 
131
-      foreach($offset as $key => $value) {
131
+      foreach ($offset as $key => $value) {
132 132
         $this->__get($key) !== $value ? $this->__set($key, $value) : false;
133 133
       }
134 134
     }
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
    */
150 150
   public function offsetUnset($offset) {
151 151
     // Если нет никакого индекса - значит нечего записывать
152
-    if(!isset($offset) || (is_array($offset) && empty($offset))) {
152
+    if (!isset($offset) || (is_array($offset) && empty($offset))) {
153 153
       return;
154 154
     }
155 155
 
156 156
     !is_array($offset) ? $offset = array($offset) : false;
157 157
 
158
-    if($this->offsetExists($offset)) {
158
+    if ($this->offsetExists($offset)) {
159 159
 //pdump($offset);
160 160
       // Перематываем массив в конец
161 161
       $key_to_delete = end($offset);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 //pdump($key_to_delete, '$key_to_delete');
164 164
       $parent_offset = $offset;
165 165
       array_pop($parent_offset);
166
-      if(!count($parent_offset)) {
166
+      if (!count($parent_offset)) {
167 167
         // В массиве был один элемент - мы удаляем в корне. Просто удаляем элемент
168 168
         $this->__unset($key_to_delete);
169 169
       } else {
Please login to merge, or discard this patch.
includes/classes/classConfig.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
     'advGoogleLeftMenuCode'        => '(Place here code for banner)',
191 191
 
192 192
     // Alliance bonus calculations
193
-    'ali_bonus_algorithm'          => 0,  // Bonus calculation algorithm
193
+    'ali_bonus_algorithm'          => 0, // Bonus calculation algorithm
194 194
     'ali_bonus_brackets'           => 10, // Brackets count for ALI_BONUS_BY_RANK
195
-    'ali_bonus_brackets_divisor'   => 10,// Bonus divisor for ALI_BONUS_BY_RANK
195
+    'ali_bonus_brackets_divisor'   => 10, // Bonus divisor for ALI_BONUS_BY_RANK
196 196
     'ali_bonus_divisor'            => 10000000, // Rank divisor for ALI_BONUS_BY_POINTS
197 197
     'ali_bonus_members'            => 10, // Minumum alliace size to start using bonus
198 198
 
@@ -223,25 +223,25 @@  discard block
 block discarded – undo
223 223
     'deuterium_basic_income'       => 0,
224 224
     'eco_scale_storage'            => 1,
225 225
     'eco_stockman_fleet'           => '', // Black Market - Starting amount of s/h ship merchant to sell
226
-    'eco_stockman_fleet_populate'  => 1,  // Populate empty Stockman fleet with ships or not
226
+    'eco_stockman_fleet_populate'  => 1, // Populate empty Stockman fleet with ships or not
227 227
     'empire_mercenary_base_period' => PERIOD_MONTH, // Base
228 228
     'empire_mercenary_temporary'   => 0, // Temporary empire-wide mercenaries
229 229
     'energy_basic_income'          => 0,
230 230
 
231 231
     // Bashing protection settings
232
-    'fleet_bashing_attacks'        => 3,      // Max amount of attack per wave - 3 by default
233
-    'fleet_bashing_interval'       => 1800,   // Maximum interval between attacks when they still count as one wave - 30m by default
234
-    'fleet_bashing_scope'          => 86400,  // Interval on which bashing waves counts - 24h by default
235
-    'fleet_bashing_war_delay'      => 43200,  // Delay before start bashing after declaring war to alliance - 12h by default
236
-    'fleet_bashing_waves'          => 3,      // Max amount of waves per day - 3 by default
232
+    'fleet_bashing_attacks'        => 3, // Max amount of attack per wave - 3 by default
233
+    'fleet_bashing_interval'       => 1800, // Maximum interval between attacks when they still count as one wave - 30m by default
234
+    'fleet_bashing_scope'          => 86400, // Interval on which bashing waves counts - 24h by default
235
+    'fleet_bashing_war_delay'      => 43200, // Delay before start bashing after declaring war to alliance - 12h by default
236
+    'fleet_bashing_waves'          => 3, // Max amount of waves per day - 3 by default
237 237
 
238 238
     'Fleet_Cdr'   => 30,
239 239
     'fleet_speed' => 1,
240 240
 
241 241
     'fleet_update_interval' => 4,
242 242
 
243
-    'game_adminEmail'       => 'root@localhost',    // Admin's email to show to users
244
-    'game_counter'          => 0,  // Does built-in page hit counter is on?
243
+    'game_adminEmail'       => 'root@localhost', // Admin's email to show to users
244
+    'game_counter'          => 0, // Does built-in page hit counter is on?
245 245
     // Defaults
246 246
     'game_default_language' => 'ru',
247 247
     'game_default_skin'     => 'skins/EpicBlue/',
@@ -255,13 +255,13 @@  discard block
 block discarded – undo
255 255
     'game_maxSystem'      => 199,
256 256
     'game_maxPlanet'      => 15,
257 257
     // Game global settings
258
-    'game_mode'           => 0,           // 0 - SuperNova, 1 - oGame
258
+    'game_mode'           => 0, // 0 - SuperNova, 1 - oGame
259 259
     'game_name'           => 'SuperNova', // Server name (would be on banners and on top of left menu)
260 260
 
261 261
     'game_news_actual'   => 259200, // How long announcement would be marked as "New". In seconds. Default - 3 days
262
-    'game_news_overview' => 3,    // How much last news to show in Overview page
262
+    'game_news_overview' => 3, // How much last news to show in Overview page
263 263
     // Noob protection
264
-    'game_noob_factor'   => 5,    // Multiplier to divide "stronger" and "weaker" users
264
+    'game_noob_factor'   => 5, // Multiplier to divide "stronger" and "weaker" users
265 265
     'game_noob_points'   => 5000, // Below this point user threated as noob. 0 to disable
266 266
 
267 267
     'game_multiaccount_enabled' => 0, // 1 - allow interactions for players with same IP (multiaccounts)
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
     'payment_currency_exchange_wmu' => 30,
312 312
     'payment_currency_exchange_wmz' => 1,
313 313
 
314
-    'payment_lot_price' => 1,     // Lot price in default currency
315
-    'payment_lot_size'  => 2500,  // Lot size. Also service as minimum amount of DM that could be bought with one transaction
314
+    'payment_lot_price' => 1, // Lot price in default currency
315
+    'payment_lot_size'  => 2500, // Lot size. Also service as minimum amount of DM that could be bought with one transaction
316 316
 
317 317
     'planet_teleport_cost'    => 50000, //
318 318
     'planet_teleport_timeout' => 86400, //
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     'resource_multiplier'     => 1,
331 331
 
332 332
     //Roleplay system
333
-    'rpg_bonus_divisor'       => 10,    // Amount of DM referral shoud get for partner have 1 DM bonus
333
+    'rpg_bonus_divisor'       => 10, // Amount of DM referral shoud get for partner have 1 DM bonus
334 334
     'rpg_bonus_minimum'       => 10000, // Minimum DM ammount for starting paying bonuses to affiliate
335 335
 
336 336
     // Black Market - General
Please login to merge, or discard this patch.
includes/classes/classPersistent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $qry[] = "('{$item_name}', '{$item_value}')";
97 97
       }
98 98
     }
99
-    doquery("REPLACE INTO `{{" . $this->table_name . "}}` (`{$this->sql_index_field}`, `{$this->sql_value_field}`) VALUES " . implode(',', $qry) . ";");
99
+    doquery("REPLACE INTO `{{".$this->table_name."}}` (`{$this->sql_index_field}`, `{$this->sql_value_field}`) VALUES ".implode(',', $qry).";");
100 100
 
101 101
     // И только после взятия блокировок - меняем значения в кэше
102 102
     foreach ($item_list as $item_name => $item_value) {
Please login to merge, or discard this patch.