Completed
Push — work-fleets ( 47cb39...a1ac53 )
by SuperNova.WS
05:19
created
officer.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.
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/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.
includes/includes/upd_helpers.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
   // classSupernova::$db->sn_db_connect();
16 16
   if (!(strpos($query, '{{') === false)) {
17 17
     foreach ($update_tables as $tableName => $cork) {
18
-      $query = str_replace("{{{$tableName}}}", classSupernova::$db->db_prefix . $tableName, $query);
18
+      $query = str_replace("{{{$tableName}}}", classSupernova::$db->db_prefix.$tableName, $query);
19 19
     }
20 20
   }
21
-  !($result = classSupernova::$db->db_sql_query($query)) ? die('Query error for ' . $query . ': ' . db_error()) : false;
21
+  !($result = classSupernova::$db->db_sql_query($query)) ? die('Query error for '.$query.': '.db_error()) : false;
22 22
 
23 23
   return $result;
24 24
 }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
   global $update_tables, $update_indexes, $update_indexes_full, $update_foreigns;
86 86
 
87 87
   $tableName = $prefixed ? str_replace(classSupernova::$config->db_prefix, '', $prefix_table_name) : $prefix_table_name;
88
-  $prefix_table_name = $prefixed ? $prefix_table_name : classSupernova::$config->db_prefix . $prefix_table_name;
88
+  $prefix_table_name = $prefixed ? $prefix_table_name : classSupernova::$config->db_prefix.$prefix_table_name;
89 89
 
90 90
   upd_unset_table_info($tableName);
91 91
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     $update_indexes_full[$tableName][$r1['Key_name']][$r1['Column_name']] = $r1;
101 101
   }
102 102
 
103
-  $q1 = upd_do_query("SELECT * FROM `information_schema`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = '" . db_escape(classSupernova::$db_name) . "' AND TABLE_NAME = '{$prefix_table_name}' AND REFERENCED_TABLE_NAME is not null;", true);
103
+  $q1 = upd_do_query("SELECT * FROM `information_schema`.`KEY_COLUMN_USAGE` WHERE `TABLE_SCHEMA` = '".db_escape(classSupernova::$db_name)."' AND TABLE_NAME = '{$prefix_table_name}' AND REFERENCED_TABLE_NAME is not null;", true);
104 104
   while ($r1 = db_fetch($q1)) {
105 105
     $table_referenced = str_replace(classSupernova::$config->db_prefix, '', $r1['REFERENCED_TABLE_NAME']);
106 106
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     $result = upd_do_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}{$table_name}` {$declaration}");
161 161
     $error = db_error();
162 162
     if ($error) {
163
-      die("Creating error for table `{$table_name}`: {$error}<br />" . dump($declaration));
163
+      die("Creating error for table `{$table_name}`: {$error}<br />".dump($declaration));
164 164
     }
165 165
     upd_do_query('set foreign_key_checks = 1;', true);
166 166
     upd_load_table_info($table_name, false);
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
     "SELECT {$fields}
176 176
     FROM {{unit}}
177 177
     WHERE
178
-      `unit_location_type` = {$location_type} AND `unit_location_id` = {$location_id} AND " . db_unit_time_restrictions() .
179
-    ($user_id = intval($user_id) ? " AND `unit_player_id` = {$user_id}" : '') .
180
-    ($unit_snid = intval($unit_snid) ? " AND `unit_snid` = {$unit_snid}" : '') .
181
-    " LIMIT 1" .
178
+      `unit_location_type` = {$location_type} AND `unit_location_id` = {$location_id} AND ".db_unit_time_restrictions().
179
+    ($user_id = intval($user_id) ? " AND `unit_player_id` = {$user_id}" : '').
180
+    ($unit_snid = intval($unit_snid) ? " AND `unit_snid` = {$unit_snid}" : '').
181
+    " LIMIT 1".
182 182
     ($for_update ? ' FOR UPDATE' : '')
183 183
   ));
184 184
 }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     foreach ($table_data as $record_id => $conditions) {
260 260
       $where = '';
261 261
       if (!empty($conditions['where'])) {
262
-        $where = 'WHERE ' . implode(' AND ', $conditions['where']);
262
+        $where = 'WHERE '.implode(' AND ', $conditions['where']);
263 263
       }
264 264
 
265 265
       $fields = array();
@@ -268,12 +268,12 @@  discard block
 block discarded – undo
268 268
           $condition = "`{$field_name}` = ";
269 269
           $value = '';
270 270
           if ($field_data['delta']) {
271
-            $value = "`{$field_name}`" . ($field_data['delta'] >= 0 ? '+' : '') . $field_data['delta'];
271
+            $value = "`{$field_name}`".($field_data['delta'] >= 0 ? '+' : '').$field_data['delta'];
272 272
           } elseif ($field_data['set']) {
273 273
             $value = (is_string($field_data['set']) ? "'{$field_data['set']}'" : $field_data['set']);
274 274
           }
275 275
           if ($value) {
276
-            $fields[] = $condition . $value;
276
+            $fields[] = $condition.$value;
277 277
           }
278 278
         }
279 279
       }
Please login to merge, or discard this patch.
includes/includes/eco_bld_structures.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
     }
69 69
     $build_unit_list = sn_get_groups('tech');
70 70
     $artifact_id = ART_HEURISTIC_CHIP;
71
-    $page_header = classLocale::$lang['tech'][UNIT_TECHNOLOGIES] . ($user['user_as_ally'] ? "&nbsp;{$classLocale['sys_of_ally']}&nbsp;{$user['username']}" : '');
71
+    $page_header = classLocale::$lang['tech'][UNIT_TECHNOLOGIES].($user['user_as_ally'] ? "&nbsp;{$classLocale['sys_of_ally']}&nbsp;{$user['username']}" : '');
72 72
   } elseif ($que_type == QUE_MERCENARY) {
73 73
     $build_unit_list = sn_get_groups('mercenaries');
74 74
     $artifact_id = 0;
75
-    $page_header = classLocale::$lang['tech'][UNIT_MERCENARIES] . ($user['user_as_ally'] ? "&nbsp;{$classLocale['sys_of_ally']}&nbsp;{$user['username']}" : '');
75
+    $page_header = classLocale::$lang['tech'][UNIT_MERCENARIES].($user['user_as_ally'] ? "&nbsp;{$classLocale['sys_of_ally']}&nbsp;{$user['username']}" : '');
76 76
   } else {
77 77
     if (mrc_get_level($user, $planet, STRUC_FACTORY_HANGAR) == 0) {
78 78
       message(classLocale::$lang['need_hangar'], classLocale::$lang['tech'][STRUC_FACTORY_HANGAR]);
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
               * ($resource_id == RES_ENERGY ? $config_resource_multiplier_plain : $config_resource_multiplier)
246 246
               * (isset($density_info[$resource_id]) ? $density_info[$resource_id] : 1)))
247 247
           ) {
248
-            $level_production_base['R' . $resource_id] = $resource_income;
248
+            $level_production_base['R'.$resource_id] = $resource_income;
249 249
           }
250 250
         }
251 251
       }
@@ -272,8 +272,8 @@  discard block
 block discarded – undo
272 272
             * ($resource_id == RES_ENERGY ? $config_resource_multiplier_plain : $config_resource_multiplier)
273 273
             * (isset($density_info[$resource_id]) ? $density_info[$resource_id] : 1)))
274 274
           ) {
275
-            $level_production['R' . $resource_id] = $resource_income;
276
-            $level_production['D' . $resource_id] = $resource_income - $level_production_base[$resource_id];
275
+            $level_production['R'.$resource_id] = $resource_income;
276
+            $level_production['D'.$resource_id] = $resource_income - $level_production_base[$resource_id];
277 277
           }
278 278
         }
279 279
         $production['.']['resource'][] = $level_production;
@@ -288,15 +288,15 @@  discard block
 block discarded – undo
288 288
       $level_start = $level_base_and_que > 1 ? $level_effective + $level_in_que - 1 : 1;
289 289
       for ($i = 0; $i < 6; $i++) {
290 290
         $level_production = array('LEVEL' => $level_start + $i);
291
-        $level_production['R' . UNIT_PLAYER_EXPEDITIONS_MAX] = get_player_max_expeditons($user, $level_start + $i);
292
-        $level_production['D' . UNIT_PLAYER_EXPEDITIONS_MAX] = $level_production['R' . UNIT_PLAYER_EXPEDITIONS_MAX] - $level_production_base[UNIT_PLAYER_EXPEDITIONS_MAX];
293
-        $level_production['R' . UNIT_PLAYER_COLONIES_MAX] = get_player_max_colonies($user, $level_start + $i);
294
-        $level_production['D' . UNIT_PLAYER_COLONIES_MAX] = $level_production['R' . UNIT_PLAYER_COLONIES_MAX] - $level_production_base[UNIT_PLAYER_COLONIES_MAX];
291
+        $level_production['R'.UNIT_PLAYER_EXPEDITIONS_MAX] = get_player_max_expeditons($user, $level_start + $i);
292
+        $level_production['D'.UNIT_PLAYER_EXPEDITIONS_MAX] = $level_production['R'.UNIT_PLAYER_EXPEDITIONS_MAX] - $level_production_base[UNIT_PLAYER_EXPEDITIONS_MAX];
293
+        $level_production['R'.UNIT_PLAYER_COLONIES_MAX] = get_player_max_colonies($user, $level_start + $i);
294
+        $level_production['D'.UNIT_PLAYER_COLONIES_MAX] = $level_production['R'.UNIT_PLAYER_COLONIES_MAX] - $level_production_base[UNIT_PLAYER_COLONIES_MAX];
295 295
         $production['.']['resource'][] = $level_production;
296 296
 
297 297
         $level_production_base = array(
298
-          UNIT_PLAYER_EXPEDITIONS_MAX => $level_production['R' . UNIT_PLAYER_EXPEDITIONS_MAX],
299
-          UNIT_PLAYER_COLONIES_MAX    => $level_production['R' . UNIT_PLAYER_COLONIES_MAX],
298
+          UNIT_PLAYER_EXPEDITIONS_MAX => $level_production['R'.UNIT_PLAYER_EXPEDITIONS_MAX],
299
+          UNIT_PLAYER_COLONIES_MAX    => $level_production['R'.UNIT_PLAYER_COLONIES_MAX],
300 300
         );
301 301
       }
302 302
     }
Please login to merge, or discard this patch.