Completed
Push — trunk ( 34029c...0f5c9b )
by SuperNova.WS
03:54
created
includes/includes/user_birthday_celebrate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-function sn_user_birthday_celebrate()
4
-{
3
+function sn_user_birthday_celebrate() {
5 4
   global $config, $lang;
6 5
 
7 6
   sn_db_transaction_start();
Please login to merge, or discard this patch.
includes/includes/flt_mission_transport.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * @copyright 2008 By Chlorel for XNova
9 9
  */
10 10
 
11
-function flt_mission_transport(&$mission_data)
12
-{
11
+function flt_mission_transport(&$mission_data) {
13 12
   $fleet_row          = &$mission_data['fleet'];
14 13
   $source_planet      = &$mission_data['src_planet'];
15 14
   $destination_planet = &$mission_data['dst_planet'];
Please login to merge, or discard this patch.
includes/includes/flt_mission_colonize.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
 // ----------------------------------------------------------------------------------------------------------------
11 11
 // Mission Case 9: -> Coloniser
12 12
 //
13
-function flt_mission_colonize(&$mission_data)
14
-{
13
+function flt_mission_colonize(&$mission_data) {
15 14
   $fleet_row          = &$mission_data['fleet'];
16 15
   $src_user_row       = &$mission_data['src_user'];
17 16
 
Please login to merge, or discard this patch.
includes/pages/techtree.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@
 block discarded – undo
6 6
  * version 2.0 copyright (c) 2012 by Gorlum for http://supernova.ws
7 7
  */
8 8
 
9
-function sn_techtree_view($template = null)
10
-{
9
+function sn_techtree_view($template = null) {
11 10
   global $lang, $user, $planetrow;
12 11
 
13 12
   $tech_tree = array();
Please login to merge, or discard this patch.
includes/includes/flt_functions.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function flt_fleet_speed($user, $fleet)
4
-{
3
+function flt_fleet_speed($user, $fleet) {
5 4
   if (!is_array($fleet))
6 5
   {
7 6
     $fleet = array($fleet => 1);
@@ -29,16 +28,13 @@  discard block
 block discarded – undo
29 28
   if($from['galaxy'] != $to['galaxy'])
30 29
   {
31 30
     $distance = abs($from['galaxy'] - $to['galaxy']) * $config->uni_galaxy_distance;
32
-  }
33
-  elseif($from['system'] != $to['system'])
31
+  } elseif($from['system'] != $to['system'])
34 32
   {
35 33
     $distance = abs($from['system'] - $to['system']) * 5 * 19 + 2700;
36
-  }
37
-  elseif($from['planet'] != $to['planet'])
34
+  } elseif($from['planet'] != $to['planet'])
38 35
   {
39 36
     $distance = abs($from['planet'] - $to['planet']) * 5 + 1000;
40
-  }
41
-  else
37
+  } else
42 38
   {
43 39
     $distance = 5;
44 40
   }
@@ -55,8 +51,7 @@  discard block
 block discarded – undo
55 51
  *
56 52
  * @return array
57 53
  */
58
-function flt_travel_data($user_row, $from, $to, $fleet_array, $speed_percent = 10)
59
-{
54
+function flt_travel_data($user_row, $from, $to, $fleet_array, $speed_percent = 10) {
60 55
   $distance = flt_travel_distance($from, $to);
61 56
 
62 57
   $consumption = 0;
@@ -120,8 +115,7 @@  discard block
 block discarded – undo
120 115
   );
121 116
 }
122 117
 
123
-function flt_bashing_check($user, $enemy, $planet_dst, $mission, $flight_duration, $fleet_group = 0)
124
-{
118
+function flt_bashing_check($user, $enemy, $planet_dst, $mission, $flight_duration, $fleet_group = 0) {
125 119
   global $config;
126 120
 
127 121
   $config_bashing_attacks = $config->fleet_bashing_attacks;
@@ -531,8 +525,7 @@  discard block
 block discarded – undo
531 525
       $fleet_ship_count += $amount;
532 526
       $fleet_string     .= "{$unit_id},{$amount};";
533 527
       $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($unit_id, -$amount, $user, $from['id']);
534
-    }
535
-    elseif(in_array($unit_id, sn_get_groups('resources_loot')))
528
+    } elseif(in_array($unit_id, sn_get_groups('resources_loot')))
536 529
     {
537 530
       $planet_fields[pname_resource_name($unit_id)]['delta'] -= $amount;
538 531
     }
@@ -624,8 +617,7 @@  discard block
 block discarded – undo
624 617
 //ini_set('error_reporting', E_ALL ^ E_NOTICE);
625 618
 }
626 619
 
627
-function flt_calculate_ship_to_transport_sort($a, $b)
628
-{
620
+function flt_calculate_ship_to_transport_sort($a, $b) {
629 621
   return $a['transport_effectivness'] == $b['transport_effectivness'] ? 0 : ($a['transport_effectivness'] > $b['transport_effectivness'] ? -1 : 1);
630 622
 }
631 623
 
@@ -634,8 +626,7 @@  discard block
 block discarded – undo
634 626
 // $resource_amount - how much amount of resources need to be transported
635 627
 // $from - transport from
636 628
 // $to - transport to
637
-function flt_calculate_fleet_to_transport($ship_list, $resource_amount, $from, $to)
638
-{
629
+function flt_calculate_fleet_to_transport($ship_list, $resource_amount, $from, $to) {
639 630
   global $user;
640 631
 
641 632
   $ship_data = array();
Please login to merge, or discard this patch.
jumpgate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,8 +115,7 @@
 block discarded – undo
115 115
     ));
116 116
 
117 117
     display($template, $lang['tech'][STRUC_MOON_GATE]);
118
-  }
119
-  else
118
+  } else
120 119
   {
121 120
     messageBox($lang['gate_no_src_ga'], $lang['tech'][STRUC_MOON_GATE], "overview.php", 10);
122 121
   }
Please login to merge, or discard this patch.
includes/alliance/ali_internal_admin.inc 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,14 +74,12 @@  discard block
 block discarded – undo
74 74
     doquery("UPDATE {{alliance}} SET " . implode(',', $ally_changeset) . " WHERE `id`='{$ally['id']}' LIMIT 1;");
75 75
     sys_redirect('alliance.php?mode=admin&edit=ally');
76 76
   }
77
-}
78
-elseif(sys_get_param_str('isSaveText'))
77
+} elseif(sys_get_param_str('isSaveText'))
79 78
 {
80 79
   $text = sys_get_param_str_both('text');
81 80
   doquery("UPDATE {{alliance}} SET `{$text_list[$allyTextID]['db_field']}`='{$text['safe']}' WHERE `id`='{$ally['id']}';");
82 81
   $ally[$text_list[$allyTextID]['db_field']] = $text['unsafe'];
83
-}
84
-elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader'))
82
+} elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader'))
85 83
 {
86 84
   if(!$isAllyOwner)
87 85
   {
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
     sn_db_transaction_commit();
99 97
     sys_redirect('alliance.php');
100 98
   }
101
-}
102
-elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband'))
99
+} elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband'))
103 100
 {
104 101
   if(!$isAllyOwner)
105 102
   {
Please login to merge, or discard this patch.
includes/alliance/ali_info.inc 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,16 +23,14 @@  discard block
 block discarded – undo
23 23
     $lang['Go_out_welldone'] = str_replace("%s", $ally_name, $lang['Go_out_welldone']);
24 24
     messageBox(sprintf($lang['ali_info_leave_success'], $ally['ally_name']), $lang['sys_alliance']);
25 25
   }
26
-}
27
-elseif($mode == 'ainfo')
26
+} elseif($mode == 'ainfo')
28 27
 {
29 28
   $tag = sys_get_param_str('tag');
30 29
   $id_ally = sys_get_param_id('a');
31 30
   if($tag)
32 31
   {
33 32
     $ally = doquery("SELECT * FROM {{alliance}} WHERE ally_tag='{$tag}' LIMIT 1;", '', true);
34
-  }
35
-  elseif($id_ally)
33
+  } elseif($id_ally)
36 34
   {
37 35
     $ally = doquery("SELECT * FROM {{alliance}} WHERE id='{$id_ally}' LIMIT 1;", '', true);
38 36
   }
@@ -52,20 +50,17 @@  discard block
 block discarded – undo
52 50
     'USER_ALLY_ID' => $user['ally_id'],
53 51
   ));
54 52
   $page_header          = $lang['sys_alliance'];
55
-}
56
-else
53
+} else
57 54
 {
58 55
   $page_header = $lang['your_alliance'];
59 56
 
60 57
   if($ally['ally_owner'] == $user['id'])
61 58
   {
62 59
     $range = $ally['ally_owner_range'] ? $ally['ally_owner_range'] : $lang['Founder'];
63
-  }
64
-  elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name']))
60
+  } elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name']))
65 61
   {
66 62
     $range = $ranks[$user['ally_rank_id']]['name'];
67
-  }
68
-  else
63
+  } else
69 64
   {
70 65
     $range = $lang['member'];
71 66
   }
Please login to merge, or discard this patch.
admin/statbuilder.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@
 block discarded – undo
37 37
   </script>';
38 38
 
39 39
   messageBoxAdmin("{$script}<img src=\"design/images/progressbar.gif\"><br>{$lang['sys_wait']}", $lang['adm_stat_title'], '', 0);
40
-}
41
-else
40
+} else
42 41
 {
43 42
   messageBoxAdmin($lang['adm_stat_already_started'], $lang['adm_stat_title'], 'admin/overview.php');
44 43
 }
Please login to merge, or discard this patch.