Completed
Branch work-fleets (e0e753)
by SuperNova.WS
05:15
created
logout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-include('common.' . substr(strrchr(__FILE__, '.'), 1));
3
+include('common.'.substr(strrchr(__FILE__, '.'), 1));
4 4
 
5 5
 $template = gettemplate('viewreport', true);
6 6
 $template->assign_var('PAGE_HINT', classLocale::$lang['cr_view_hint']);
Please login to merge, or discard this patch.
admin/adm_metamatter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@
 block discarded – undo
13 13
 define('INSTALL', false);
14 14
 define('IN_ADMIN', true);
15 15
 
16
-require('../common.' . substr(strrchr(__FILE__, '.'), 1));
16
+require('../common.'.substr(strrchr(__FILE__, '.'), 1));
17 17
 
18 18
 if (!sn_module_get_active_count('payment')) {
19
-  sys_redirect(SN_ROOT_VIRTUAL . 'admin/overview.php');
19
+  sys_redirect(SN_ROOT_VIRTUAL.'admin/overview.php');
20 20
 }
21 21
 
22 22
 if ($user['authlevel'] < 3) {
Please login to merge, or discard this patch.
server_info.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-include('common.' . substr(strrchr(__FILE__, '.'), 1));
3
+include('common.'.substr(strrchr(__FILE__, '.'), 1));
4 4
 
5 5
 $template = gettemplate('viewreport', true);
6 6
 $template->assign_var('PAGE_HINT', classLocale::$lang['cr_view_hint']);
Please login to merge, or discard this patch.
includes/classes/supernova.php 1 patch
Spacing   +19 added lines, -21 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     //print("<br />CACHE CLEAR {$cache_id} " . ($hard ? 'HARD' : 'SOFT') . "<br />");
249 249
     if ($hard && !empty(static::$data[$location_type])) {
250 250
       // Здесь нельзя делать unset - надо записывать NULL, что бы это отразилось на зависимых записях
251
-      array_walk(static::$data[$location_type], function (&$item) { $item = null; });
251
+      array_walk(static::$data[$location_type], function(&$item) { $item = null; });
252 252
     }
253 253
     static::$locator[$location_type] = array();
254 254
     static::$queries[$location_type] = array();
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
     if (!empty($error_msg)) {
370 370
       // TODO - Убрать позже
371
-      print('<h1>СООБЩИТЕ ЭТО АДМИНУ: sn_db_transaction_check() - ' . $error_msg . '</h1>');
371
+      print('<h1>СООБЩИТЕ ЭТО АДМИНУ: sn_db_transaction_check() - '.$error_msg.'</h1>');
372 372
       $backtrace = debug_backtrace();
373 373
       array_shift($backtrace);
374 374
       pdump($backtrace);
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
   public static function db_transaction_start($level = '') {
382 382
     static::db_transaction_check(null);
383 383
 
384
-    $level ? doquery('SET TRANSACTION ISOLATION LEVEL ' . $level) : false;
384
+    $level ? doquery('SET TRANSACTION ISOLATION LEVEL '.$level) : false;
385 385
 
386 386
     static::$transaction_id++;
387 387
     doquery('START TRANSACTION');
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
   public static function db_lock_tables($tables) {
443 443
     $tables = is_array($tables) ? $tables : array($tables => '');
444 444
     foreach ($tables as $table_name => $condition) {
445
-      self::$db->doquery("SELECT 1 FROM {{{$table_name}}}" . ($condition ? ' WHERE ' . $condition : ''));
445
+      self::$db->doquery("SELECT 1 FROM {{{$table_name}}}".($condition ? ' WHERE '.$condition : ''));
446 446
     }
447 447
   }
448 448
 
@@ -502,8 +502,8 @@  discard block
 block discarded – undo
502 502
           $query = static::db_query(
503 503
             "SELECT
504 504
               distinct({{{$location_info[P_TABLE_NAME]}}}.{$owner_data[P_OWNER_FIELD]}) AS parent_id
505
-            FROM {{{$location_info[P_TABLE_NAME]}}}" .
506
-            ($filter ? ' WHERE ' . $filter : '') .
505
+            FROM {{{$location_info[P_TABLE_NAME]}}}".
506
+            ($filter ? ' WHERE '.$filter : '').
507 507
             ($fetch ? ' LIMIT 1' : ''), false, true);
508 508
 
509 509
           //pdump($q, 'Запрос блокировки');
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
             //pdump($indexes_str, '$indexes_str');
520 520
             $parent_id_field = static::$location_info[$owner_location_type][P_ID];
521 521
             static::db_get_record_list($owner_location_type,
522
-              $parent_id_field . (count($parent_id_list) > 1 ? " IN ({$indexes_str})" : " = {$indexes_str}"), $fetch, true);
522
+              $parent_id_field.(count($parent_id_list) > 1 ? " IN ({$indexes_str})" : " = {$indexes_str}"), $fetch, true);
523 523
           }
524 524
           //pdump($filter, 'Транзакция - родители заблокированы ' . $owner_location_type);
525 525
         }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 
528 528
       //pdump($filter, 'Выбираем записи и заносим их в кыш-память ' . $owner_location_type);
529 529
       $query = static::db_query(
530
-        "SELECT * FROM {{{$location_info[P_TABLE_NAME]}}}" .
530
+        "SELECT * FROM {{{$location_info[P_TABLE_NAME]}}}".
531 531
         (($filter = trim($filter)) ? " WHERE {$filter}" : '')
532 532
       );
533 533
       while ($row = db_fetch($query)) {
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
 
599 599
 //static::db_get_record_list($location_type, $condition, false, true);
600 600
 
601
-    if ($result = static::db_query("UPDATE {{{$table_name}}} SET " . $set . ($condition ? ' WHERE ' . $condition : ''))) {
601
+    if ($result = static::db_query("UPDATE {{{$table_name}}} SET ".$set.($condition ? ' WHERE '.$condition : ''))) {
602 602
 
603 603
       if (static::$db->db_affected_rows()) { // Обновляем данные только если ряд был затронут
604 604
         // Поскольку нам неизвестно, что и как обновилось - сбрасываем кэш этого типа полностью
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
       // self::db_get_record_list(LOC_USER, "`username` " . ($like ? 'LIKE' : '='). " '{$username_safe}'");
765 765
 
766 766
       $user = static::db_query(
767
-        "SELECT * FROM {{users}} WHERE `username` " . ($like ? 'LIKE' : '=') . " '{$username_safe}'"
767
+        "SELECT * FROM {{users}} WHERE `username` ".($like ? 'LIKE' : '=')." '{$username_safe}'"
768 768
         , true);
769 769
       static::cache_set(LOC_USER, $user['id'], $user); // В кэш-юзер так же заполнять индексы
770 770
     }
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
       // Вытаскиваем запись
797 797
       $email_safe = db_escape($email_unsafe);
798 798
       $user = static::db_query(
799
-        "SELECT * FROM {{users}} WHERE LOWER(`email_2`) = '{$email_safe}'" .
799
+        "SELECT * FROM {{users}} WHERE LOWER(`email_2`) = '{$email_safe}'".
800 800
         ($use_both ? " OR LOWER(`email`) = '{$email_safe}'" : '')
801 801
         , true);
802 802
 
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 
856 856
     $query_cache = &static::$locator[LOC_UNIT][$location_type][$location_id];
857 857
     if (!isset($query_cache)) {
858
-      $got_data = static::db_get_record_list(LOC_UNIT, "unit_location_type = {$location_type} AND unit_location_id = {$location_id} AND " . static::db_unit_time_restrictions());
858
+      $got_data = static::db_get_record_list(LOC_UNIT, "unit_location_type = {$location_type} AND unit_location_id = {$location_id} AND ".static::db_unit_time_restrictions());
859 859
       if (is_array($got_data)) {
860 860
         foreach ($got_data as $unit_id => $unit_data) {
861 861
           // static::$data[LOC_LOCATION][$location_type][$location_id][$unit_data['unit_snid']] = &static::$data[LOC_UNIT][$unit_id];
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
     if ($que_type == QUE_RESEARCH || $planet_id === null) {
919 919
       $query[] = "`que_planet_id` IS NULL";
920 920
     } elseif ($planet_id) {
921
-      $query[] = "(`que_planet_id` = {$planet_id}" . ($que_type ? '' : ' OR que_planet_id IS NULL') . ")";
921
+      $query[] = "(`que_planet_id` = {$planet_id}".($que_type ? '' : ' OR que_planet_id IS NULL').")";
922 922
     }
923 923
     if ($que_type) {
924 924
       $query[] = "`que_type` = {$que_type}";
@@ -1072,13 +1072,13 @@  discard block
 block discarded – undo
1072 1072
         $condition = "`{$field_name}` = ";
1073 1073
         $value = '';
1074 1074
         if ($field_data['delta']) {
1075
-          $value = "`{$field_name}`" . ($field_data['delta'] >= 0 ? '+' : '') . $field_data['delta'];
1075
+          $value = "`{$field_name}`".($field_data['delta'] >= 0 ? '+' : '').$field_data['delta'];
1076 1076
         } elseif ($field_data['set']) {
1077 1077
           $value = (is_string($field_data['set']) ? "'{$field_data['set']}'" : $field_data['set']);
1078 1078
         }
1079 1079
 
1080 1080
         if ($value) {
1081
-          $fields[] = $condition . $value;
1081
+          $fields[] = $condition.$value;
1082 1082
         }
1083 1083
       }
1084 1084
       $conditions[P_FIELDS_STR] = implode(',', $fields);
@@ -1092,9 +1092,7 @@  discard block
 block discarded – undo
1092 1092
           // Простое условие - $field_id = $field_value
1093 1093
           if (is_string($field_id)) {
1094 1094
             $field_value =
1095
-              $field_value === null ? 'NULL' :
1096
-                (is_string($field_value) ? "'" . db_escape($field_value) . "'" :
1097
-                  (is_bool($field_value) ? intval($field_value) : $field_value));
1095
+              $field_value === null ? 'NULL' : (is_string($field_value) ? "'".db_escape($field_value)."'" : (is_bool($field_value) ? intval($field_value) : $field_value));
1098 1096
             $the_conditions[] = "`{$field_id}` = {$field_value}";
1099 1097
           } else {
1100 1098
             die('Неподдерживаемый тип условия');
@@ -1126,7 +1124,7 @@  discard block
 block discarded – undo
1126 1124
         die('Неподдерживаемая операция в classSupernova::db_changeset_condition_compile');
1127 1125
     }
1128 1126
 
1129
-    $conditions[P_QUERY_STR] = $conditions[P_ACTION_STR] . ' ' . $conditions[P_FIELDS_STR] . (' WHERE ' . $conditions[P_WHERE_STR]);
1127
+    $conditions[P_QUERY_STR] = $conditions[P_ACTION_STR].' '.$conditions[P_FIELDS_STR].(' WHERE '.$conditions[P_WHERE_STR]);
1130 1128
   }
1131 1129
 
1132 1130
   public static function db_changeset_apply($db_changeset, $flush_delayed = false) {
@@ -1240,7 +1238,7 @@  discard block
 block discarded – undo
1240 1238
     ini_get('magic_quotes_sybase') ? die('SN is incompatible with \'magic_quotes_sybase\' turned on. Disable it in php.ini or .htaccess...') : false;
1241 1239
     if (@get_magic_quotes_gpc()) {
1242 1240
       $gpcr = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
1243
-      array_walk_recursive($gpcr, function (&$value, $key) {
1241
+      array_walk_recursive($gpcr, function(&$value, $key) {
1244 1242
         $value = stripslashes($value);
1245 1243
       });
1246 1244
     }
@@ -1284,7 +1282,7 @@  discard block
 block discarded – undo
1284 1282
   public static function init_3_load_config_file() {
1285 1283
     $dbsettings = array();
1286 1284
 
1287
-    require(SN_ROOT_PHYSICAL . "config" . DOT_PHP_EX);
1285
+    require(SN_ROOT_PHYSICAL."config".DOT_PHP_EX);
1288 1286
     //self::$db_prefix = $dbsettings['prefix'];
1289 1287
     self::$cache_prefix = !empty($dbsettings['cache_prefix']) ? $dbsettings['cache_prefix'] : $dbsettings['prefix'];
1290 1288
     self::$db_name = $dbsettings['name'];
Please login to merge, or discard this patch.
includes/classes/core_auth.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
       // Проверить наличие такого имени в истории имён
225 225
       do {
226 226
         sn_db_transaction_rollback();
227
-        $this->player_suggested_name = 'Emperor ' . mt_rand($max_user_id + 1, $max_user_id + 1000);
227
+        $this->player_suggested_name = 'Emperor '.mt_rand($max_user_id + 1, $max_user_id + 1000);
228 228
         sn_db_transaction_start();
229 229
       } while (db_player_name_exists($this->player_suggested_name));
230 230
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     if ($player_name_submitted) {
234 234
       $this->register_player_db_create($this->player_suggested_name); // OK 4.5
235 235
       if ($this->register_status == LOGIN_SUCCESS) {
236
-        sys_redirect(SN_ROOT_VIRTUAL . 'overview.php');
236
+        sys_redirect(SN_ROOT_VIRTUAL.'overview.php');
237 237
       } elseif ($this->register_status == REGISTER_ERROR_PLAYER_NAME_EXISTS && $original_suggest == $this->player_suggested_name) {
238 238
         // self::$player_suggested_name .= ' ' . $this->account->account_id;
239 239
       }
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
       );
260 260
 
261 261
     if ($this->register_status == LOGIN_ERROR_USERNAME_RESTRICTED_CHARACTERS) {
262
-      $prohibited_characters = array_map(function ($value) {
263
-        return "'" . htmlentities($value, ENT_QUOTES, 'UTF-8') . "'";
262
+      $prohibited_characters = array_map(function($value) {
263
+        return "'".htmlentities($value, ENT_QUOTES, 'UTF-8')."'";
264 264
       }, str_split(LOGIN_REGISTER_CHARACTERS_PROHIBITED));
265 265
       $template_result[F_PLAYER_REGISTER_MESSAGE] .= implode(', ', $prohibited_characters);
266 266
     }
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
     foreach ($this->providers as $provider_id => $provider) {
309 309
       $login_status = $provider->login(); // OK v4.5
310
-      self::flog(($provider->manifest['name'] . '->' . 'login_try - ') . (empty($provider->account->account_id) ? classLocale::$lang['sys_login_messages'][$provider->account_login_status] : dump($provider)));
310
+      self::flog(($provider->manifest['name'].'->'.'login_try - ').(empty($provider->account->account_id) ? classLocale::$lang['sys_login_messages'][$provider->account_login_status] : dump($provider)));
311 311
       if ($login_status == LOGIN_SUCCESS && is_object($provider->account) && $provider->account instanceof Account && $provider->account->account_id) {
312 312
         $this->providers_authorised[$provider_id] = &$this->providers[$provider_id];
313 313
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         if (!$this->is_player_register) {
348 348
           // Нет - отправляем на процесс регистрации
349 349
           $partner_id = sys_get_param_int('id_ref', sys_get_param_int('partner_id'));
350
-          sys_redirect(SN_ROOT_VIRTUAL . 'index.php?page=player_register&player_register=1' . ($partner_id ? '&id_ref=' . $partner_id : ''));
350
+          sys_redirect(SN_ROOT_VIRTUAL.'index.php?page=player_register&player_register=1'.($partner_id ? '&id_ref='.$partner_id : ''));
351 351
         }
352 352
       } else {
353 353
         // Да, есть доступные игроки, которые так же прописаны в базе
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     }
408 408
 
409 409
     if ($redirect === true) {
410
-      sys_redirect(SN_ROOT_RELATIVE . (empty($_COOKIE[SN_COOKIE_U]) ? 'login.php' : 'admin/overview.php'));
410
+      sys_redirect(SN_ROOT_RELATIVE.(empty($_COOKIE[SN_COOKIE_U]) ? 'login.php' : 'admin/overview.php'));
411 411
     } elseif ($redirect !== false) {
412 412
       sys_redirect($redirect);
413 413
     }
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
         $user['vacation'] = SN_TIME_NOW;
703 703
       }
704 704
 
705
-      $user['user_lastip'] = self::$device->ip_v4_string;// $ip['ip'];
705
+      $user['user_lastip'] = self::$device->ip_v4_string; // $ip['ip'];
706 706
       $user['user_proxy'] = self::$device->ip_v4_proxy_chain; //$ip['proxy_chain'];
707 707
 
708 708
       $result[F_BANNED_STATUS] = $user['banaday'];
@@ -710,9 +710,9 @@  discard block
 block discarded – undo
710 710
 
711 711
       $proxy_safe = static::$db->db_escape(self::$device->ip_v4_proxy_chain);
712 712
 
713
-      db_user_set_by_id($user['id'], "`onlinetime` = " . SN_TIME_NOW . ",
714
-      `banaday` = " . static::$db->db_escape($user['banaday']) . ", `vacation` = " . static::$db->db_escape($user['vacation']) . ",
715
-      `user_lastip` = '" . static::$db->db_escape($user['user_lastip']) . "', `user_last_proxy` = '{$proxy_safe}', `user_last_browser_id` = " . self::$device->browser_id
713
+      db_user_set_by_id($user['id'], "`onlinetime` = ".SN_TIME_NOW.",
714
+      `banaday` = " . static::$db->db_escape($user['banaday']).", `vacation` = ".static::$db->db_escape($user['vacation']).",
715
+      `user_lastip` = '" . static::$db->db_escape($user['user_lastip'])."', `user_last_proxy` = '{$proxy_safe}', `user_last_browser_id` = ".self::$device->browser_id
716 716
       );
717 717
     }
718 718
 
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
    */
806 806
   // OK v4
807 807
   public static function password_encode($password, $salt) {
808
-    return md5($password . $salt);
808
+    return md5($password.$salt);
809 809
   }
810 810
   /**
811 811
    * Генерирует соль
@@ -831,10 +831,10 @@  discard block
 block discarded – undo
831 831
     }
832 832
     list($called, $caller) = debug_backtrace(false);
833 833
     $caller_name =
834
-      (!empty($caller['class']) ? $caller['class'] : '') .
835
-      (!empty($caller['type']) ? $caller['type'] : '') .
836
-      (!empty($caller['function']) ? $caller['function'] : '') .
837
-      (!empty($called['line']) ? ':' . $called['line'] : '');
834
+      (!empty($caller['class']) ? $caller['class'] : '').
835
+      (!empty($caller['type']) ? $caller['type'] : '').
836
+      (!empty($caller['function']) ? $caller['function'] : '').
837
+      (!empty($called['line']) ? ':'.$called['line'] : '');
838 838
 
839 839
     $_SERVER['SERVER_NAME'] == 'localhost' ? print("<div class='debug'>$message - $caller_name\r\n</div>") : false;
840 840
 
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
     if ($die) {
843 843
       // pdump($caller);
844 844
       // pdump(debug_backtrace(false));
845
-      $die && die("<div class='negative'>СТОП! Функция {$caller_name} при вызове в " . get_called_class() . " (располагается в " . get_class() . "). СООБЩИТЕ АДМИНИСТРАЦИИ!</div>");
845
+      $die && die("<div class='negative'>СТОП! Функция {$caller_name} при вызове в ".get_called_class()." (располагается в ".get_class()."). СООБЩИТЕ АДМИНИСТРАЦИИ!</div>");
846 846
     }
847 847
   }
848 848
 
Please login to merge, or discard this patch.
includes/includes/flt_flying_fleet_handler2.php 1 patch
Spacing   +6 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,15 +19,11 @@  discard block
 block discarded – undo
19 19
 // ------------------------------------------------------------------
20 20
 function flt_flyingFleetsSort($a, $b) {
21 21
   // Сравниваем время флотов - кто раньше, тот и первый обрабатывается
22
-  return $a['fleet_time'] > $b['fleet_time'] ? 1 : ($a['fleet_time'] < $b['fleet_time'] ? -1 :
23
-    // Если время - одинаковое, сравниваем события флотов
22
+  return $a['fleet_time'] > $b['fleet_time'] ? 1 : ($a['fleet_time'] < $b['fleet_time'] ? -1 : // Если время - одинаковое, сравниваем события флотов
24 23
     // Если события - одинаковые, то флоты равны
25
-    ($a['fleet_event'] == $b['fleet_event'] ? 0 :
26
-      // Если события разные - первыми считаем прибывающие флоты
27
-      ($a['fleet_event'] == EVENT_FLT_ARRIVE ? 1 : ($b['fleet_event'] == EVENT_FLT_ARRIVE ? -1 :
28
-        // Если нет прибывающих флотов - дальше считаем флоты, которые закончили миссию
29
-        ($a['fleet_event'] == EVENT_FLT_ACOMPLISH ? 1 : ($b['fleet_event'] == EVENT_FLT_ACOMPLISH ? -1 :
30
-          // Если нет флотов, закончивших задание - остались возвращающиеся флоты, которые равны между собой
24
+    ($a['fleet_event'] == $b['fleet_event'] ? 0 : // Если события разные - первыми считаем прибывающие флоты
25
+      ($a['fleet_event'] == EVENT_FLT_ARRIVE ? 1 : ($b['fleet_event'] == EVENT_FLT_ARRIVE ? -1 : // Если нет прибывающих флотов - дальше считаем флоты, которые закончили миссию
26
+        ($a['fleet_event'] == EVENT_FLT_ACOMPLISH ? 1 : ($b['fleet_event'] == EVENT_FLT_ACOMPLISH ? -1 : // Если нет флотов, закончивших задание - остались возвращающиеся флоты, которые равны между собой
31 27
           // TODO: Добавить еще проверку по ID флота и/или времени запуска - что бы обсчитывать их в порядке запуска
32 28
           (
33 29
           0 // Вообще сюда доходить не должно - будет отсекаться на равенстве событий
@@ -45,7 +41,7 @@  discard block
 block discarded – undo
45 41
     $handler = fopen('event.log', 'a+');
46 42
   }
47 43
 
48
-  fwrite($handler, date(FMT_DATE_TIME_SQL, time()) . ' ' . $msg . "\r\n");
44
+  fwrite($handler, date(FMT_DATE_TIME_SQL, time()).' '.$msg."\r\n");
49 45
 }
50 46
 
51 47
 // ------------------------------------------------------------------
@@ -174,7 +170,7 @@  discard block
 block discarded – undo
174 170
     MT_EXPLORE   => 'flt_mission_explore',
175 171
   );
176 172
   foreach ($missions_used as $mission_id => $cork) {
177
-    require_once(SN_ROOT_PHYSICAL . "includes/includes/{$mission_files[$mission_id]}" . DOT_PHP_EX);
173
+    require_once(SN_ROOT_PHYSICAL."includes/includes/{$mission_files[$mission_id]}".DOT_PHP_EX);
178 174
   }
179 175
 
180 176
 //log_file('Обработка миссий');
Please login to merge, or discard this patch.
includes/functions/int_banner_create.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
       $img_name = classSupernova::$config->int_userbar_background;
25 25
     break;
26 26
   }
27
-  $size = getimagesize(SN_ROOT_PHYSICAL . $img_name);
28
-  $im = imagecreatefrompng(SN_ROOT_PHYSICAL . $img_name);
27
+  $size = getimagesize(SN_ROOT_PHYSICAL.$img_name);
28
+  $im = imagecreatefrompng(SN_ROOT_PHYSICAL.$img_name);
29 29
   $image = imagecreatetruecolor($size[0], $size[1]);
30 30
   imagecopy($image, $im, 0, 0, 0, 0, $size[0], $size[1]);
31 31
   imagedestroy($im);
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
37 37
   $txt_color2 = imagecolorallocatealpha($image, 255, 255, 255, 40);
38 38
 
39 39
   $fonts = array(
40
-    'userbar'  => SN_ROOT_PHYSICAL . "design/fonts/" . classSupernova::$config->int_userbar_font,
41
-    'universe' => SN_ROOT_PHYSICAL . "design/fonts/" . classSupernova::$config->int_banner_fontUniverse,
42
-    'raids'    => SN_ROOT_PHYSICAL . "design/fonts/" . classSupernova::$config->int_banner_fontRaids,
43
-    'info'     => SN_ROOT_PHYSICAL . "design/fonts/" . classSupernova::$config->int_banner_fontInfo,
40
+    'userbar'  => SN_ROOT_PHYSICAL."design/fonts/".classSupernova::$config->int_userbar_font,
41
+    'universe' => SN_ROOT_PHYSICAL."design/fonts/".classSupernova::$config->int_banner_fontUniverse,
42
+    'raids'    => SN_ROOT_PHYSICAL."design/fonts/".classSupernova::$config->int_banner_fontRaids,
43
+    'info'     => SN_ROOT_PHYSICAL."design/fonts/".classSupernova::$config->int_banner_fontInfo,
44 44
   );
45 45
 
46 46
   if ($id) {
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     $b_user = $user['username'];
53 53
     $b_ally = $user['ally_name'];
54 54
     $b_planet = $planet_row['name'];
55
-    $b_xyz = "[" . $planet_row['galaxy'] . ":" . $planet_row['system'] . ":" . $planet_row['planet'] . "]";
56
-    $b_lvl = ($user['total_rank'] ? $user['total_rank'] : classSupernova::$config->users_amount) . "/" . classSupernova::$config->users_amount;
55
+    $b_xyz = "[".$planet_row['galaxy'].":".$planet_row['system'].":".$planet_row['planet']."]";
56
+    $b_lvl = ($user['total_rank'] ? $user['total_rank'] : classSupernova::$config->users_amount)."/".classSupernova::$config->users_amount;
57 57
   } else {
58 58
     $b_user = classLocale::$lang['ov_banner_empty_id'];
59 59
     $b_lvl = '';
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
         imagettftext($image, 9, 0, 410 - $is[2], 35, $txt_color, $fonts['info'], $b_ally);
89 89
 
90 90
         // Player b_planet
91
-        imagettftext($image, 6, 0, 8, 10, $txt_shadow2, $fonts['raids'], $b_planet . " " . $b_xyz);
92
-        imagettftext($image, 6, 0, 6, 9, $txt_color2, $fonts['raids'], $b_planet . " " . $b_xyz);
91
+        imagettftext($image, 6, 0, 8, 10, $txt_shadow2, $fonts['raids'], $b_planet." ".$b_xyz);
92
+        imagettftext($image, 6, 0, 6, 9, $txt_color2, $fonts['raids'], $b_planet." ".$b_xyz);
93 93
 
94 94
         //StatPoint
95
-        $b_points = classLocale::$lang['ov_points'] . ": " . pretty_number(!empty($user['total_points']) ? $user['total_points'] : 0);
95
+        $b_points = classLocale::$lang['ov_points'].": ".pretty_number(!empty($user['total_points']) ? $user['total_points'] : 0);
96 96
         $is = imagettfbbox(8, 0, $fonts['info'], $b_points);
97 97
         imagettftext($image, 8, 0, 412 - $is[2], 11, $txt_shadow, $fonts['info'], $b_points);
98 98
         imagettftext($image, 8, 0, 410 - $is[2], 9, $txt_color, $fonts['info'], $b_points);
@@ -100,21 +100,21 @@  discard block
 block discarded – undo
100 100
         //Raids Total
101 101
         imagettftext($image, 6, 0, 8, 37, $txt_shadow2, $fonts['raids'], classLocale::$lang['NumberOfRaids']);
102 102
         imagettftext($image, 6, 0, 6, 35, $txt_color2, $fonts['raids'], classLocale::$lang['NumberOfRaids']);
103
-        $b_points = ": " . pretty_number(!empty($user['raids']) ? $user['raids'] : 0);
103
+        $b_points = ": ".pretty_number(!empty($user['raids']) ? $user['raids'] : 0);
104 104
         imagettftext($image, 6, 0, 61, 37, $txt_shadow2, $fonts['raids'], $b_points);
105 105
         imagettftext($image, 6, 0, 59, 35, $txt_color2, $fonts['raids'], $b_points);
106 106
 
107 107
         //Raids Won
108 108
         imagettftext($image, 6, 0, 8, 47, $txt_shadow2, $fonts['raids'], classLocale::$lang['RaidsWin']);
109 109
         imagettftext($image, 6, 0, 6, 45, $txt_color2, $fonts['raids'], classLocale::$lang['RaidsWin']);
110
-        $b_points = ": " . pretty_number(!empty($user['raidswin']) ? $user['raidswin'] : 0);
110
+        $b_points = ": ".pretty_number(!empty($user['raidswin']) ? $user['raidswin'] : 0);
111 111
         imagettftext($image, 6, 0, 61, 47, $txt_shadow2, $fonts['raids'], $b_points);
112 112
         imagettftext($image, 6, 0, 59, 45, $txt_color2, $fonts['raids'], $b_points);
113 113
 
114 114
         //Raids Lost
115 115
         imagettftext($image, 6, 0, 8, 57, $txt_shadow2, $fonts['raids'], classLocale::$lang['RaidsLoose']);
116 116
         imagettftext($image, 6, 0, 6, 55, $txt_color2, $fonts['raids'], classLocale::$lang['RaidsLoose']);
117
-        $b_points = ": " . pretty_number(!empty($user['raidsloose']) ? $user['raidsloose'] : 0);
117
+        $b_points = ": ".pretty_number(!empty($user['raidsloose']) ? $user['raidsloose'] : 0);
118 118
         imagettftext($image, 6, 0, 61, 57, $txt_shadow2, $fonts['raids'], $b_points);
119 119
         imagettftext($image, 6, 0, 59, 55, $txt_color2, $fonts['raids'], $b_points);
120 120
       }
Please login to merge, or discard this patch.
includes/functions/qst_quest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     $template->assign_vars($quest_templatized);
180 180
     if (!empty($quest_templatized['quest_rewards_list'])) {
181 181
       foreach ($quest_templatized['quest_rewards_list'] as $quest_reward) {
182
-        $template->assign_block_vars(($block_name ? $block_name . '.' : '') . 'quest_rewards_list', $quest_reward);
182
+        $template->assign_block_vars(($block_name ? $block_name.'.' : '').'quest_rewards_list', $quest_reward);
183 183
       }
184 184
     }
185 185
   }
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
 
250 250
         $comment_reward = array();
251 251
         foreach ($reward_list as $unit_id => $unit_amount) {
252
-          $comment_reward[] = $unit_amount . ' ' . classLocale::$lang['tech'][$unit_id];
252
+          $comment_reward[] = $unit_amount.' '.classLocale::$lang['tech'][$unit_id];
253 253
           $total_rewards[$user_id][$planet_id][$unit_id] += $unit_amount;
254 254
         }
255
-        $comment .= " {$classLocale['qst_msg_your_reward']} " . implode(',', $comment_reward);
255
+        $comment .= " {$classLocale['qst_msg_your_reward']} ".implode(',', $comment_reward);
256 256
 
257 257
         msg_send_simple_message($user['id'], 0, SN_TIME_NOW, MSG_TYPE_ADMIN, classLocale::$lang['msg_from_admin'], classLocale::$lang['qst_msg_complete_subject'], $comment);
258 258
 
Please login to merge, or discard this patch.
includes/functions/rpg_points.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
           $comment = call_user_func_array('sprintf', $comment);
55 55
         }
56 56
 //        mm_points_change($user_id, $change_type, -$metamatter_to_reduce, 'ММ в ТМ: ' . (-$dark_matter) . ' ТМ = ' . $dark_matter_exists . ' ТМ + ' . $metamatter_to_reduce . ' ММ. ' . $comment);
57
-        classSupernova::$auth->account->metamatter_change($change_type, -$metamatter_to_reduce, 'ММ в ТМ: ' . (-$dark_matter) . ' ТМ = ' . $dark_matter_exists . ' ТМ + ' . $metamatter_to_reduce . ' ММ. ' . $comment);
57
+        classSupernova::$auth->account->metamatter_change($change_type, -$metamatter_to_reduce, 'ММ в ТМ: '.(-$dark_matter).' ТМ = '.$dark_matter_exists.' ТМ + '.$metamatter_to_reduce.' ММ. '.$comment);
58 58
         $dark_matter = -$dark_matter_exists;
59 59
       }
60 60
     } else {
Please login to merge, or discard this patch.