Completed
Push — work-fleets ( ab257a...4117d7 )
by SuperNova.WS
05:11
created
flying_fleets.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@  discard block
 block discarded – undo
4 4
 
5 5
 global $debug, $lang, $user, $planetrow;
6 6
 
7
-if(!empty($_POST['return']) && is_array($_POST['return'])) {
8
-  foreach($_POST['return'] as $fleet_id) {
9
-    if($fleet_id = idval($fleet_id)) {
7
+if (!empty($_POST['return']) && is_array($_POST['return'])) {
8
+  foreach ($_POST['return'] as $fleet_id) {
9
+    if ($fleet_id = idval($fleet_id)) {
10 10
       sn_db_transaction_start();
11 11
       $objFleet = new Fleet();
12 12
       $objFleet->dbLoad($fleet_id);
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 lng_include('overview');
31 31
 lng_include('fleet');
32 32
 
33
-if(!$planetrow) {
33
+if (!$planetrow) {
34 34
   message($lang['fl_noplanetrow'], $lang['fl_error']);
35 35
 }
36 36
 
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 
39 39
 $i = 0;
40 40
 $objFleetList = FleetList::dbGetFleetListByOwnerId($user['id']);
41
-if(!empty($objFleetList)) {
42
-  foreach($objFleetList->_container as $fleet_id => $objFleet) {
41
+if (!empty($objFleetList)) {
42
+  foreach ($objFleetList->_container as $fleet_id => $objFleet) {
43 43
     $i++;
44 44
     $fleet_data = tplParseFleetObject($objFleet, $i, $user);
45 45
 
46 46
     $template->assign_block_vars('fleets', $fleet_data['fleet']);
47 47
 
48
-    foreach($fleet_data['ships'] as $ship_data) {
48
+    foreach ($fleet_data['ships'] as $ship_data) {
49 49
       $template->assign_block_vars('fleets.ships', $ship_data);
50 50
     }
51 51
   }
Please login to merge, or discard this patch.
admin/adm_message_list.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
16 16
 
17
-if($user['authlevel'] < 3) {
17
+if ($user['authlevel'] < 3) {
18 18
   AdminMessage($lang['adm_err_denied']);
19 19
 }
20 20
 
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
   ),
29 29
 );
30 30
 $template->assign_block_vars('int_type_selected', $allowed_types[-1]);
31
-foreach($sn_message_class_list as $key => $value) {
32
-  if($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX) {
31
+foreach ($sn_message_class_list as $key => $value) {
32
+  if ($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX) {
33 33
     continue;
34 34
   }
35 35
 
@@ -41,17 +41,17 @@  discard block
 block discarded – undo
41 41
 
42 42
 
43 43
 $message_delete = sys_get_param_id('msg_del');
44
-if(sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete)) {
44
+if (sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete)) {
45 45
   $message_delete = implode(', ', $message_delete);
46 46
 }
47 47
 
48
-if($message_delete) {
48
+if ($message_delete) {
49 49
   db_message_list_delete_set($message_delete);
50 50
   $template->assign_block_vars('result', array('MESSAGE' => sprintf($lang['mlst_messages_deleted'], $message_delete)));
51 51
 }
52 52
 
53 53
 
54
-if(sys_get_param('str_delete_date') && checkdate($month = sys_get_param_id('delete_month'), $day = sys_get_param_id('delete_day'), $year = sys_get_param_id('delete_year'))) {
54
+if (sys_get_param('str_delete_date') && checkdate($month = sys_get_param_id('delete_month'), $day = sys_get_param_id('delete_day'), $year = sys_get_param_id('delete_year'))) {
55 55
   $delete_date = "{$year}-{$month}-{$day}";
56 56
   db_message_list_delete_by_date($delete_date, $int_type_selected);
57 57
   $template->assign_block_vars('result', array('MESSAGE' => sprintf($lang['mlst_messages_deleted_date'], $allowed_types[$int_type_selected]['TEXT'], $delete_date)));
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
 $int_page_current = min(sys_get_param_id('int_page_current', 1), $page_max);
65 65
 
66
-if(sys_get_param('page_prev') && $int_page_current > 1) {
66
+if (sys_get_param('page_prev') && $int_page_current > 1) {
67 67
   $int_page_current--;
68
-} elseif(sys_get_param('page_next') && $int_page_current < $page_max) {
68
+} elseif (sys_get_param('page_next') && $int_page_current < $page_max) {
69 69
   $int_page_current++;
70 70
 }
71 71
 
72
-for($i = 1; $i <= $page_max; $i++) {
72
+for ($i = 1; $i <= $page_max; $i++) {
73 73
   $template->assign_block_vars('page', array('NUMBER' => $i));
74 74
 }
75 75
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 $StartRec = ($int_page_current - 1) * 25;
78 78
 
79 79
 $Messages = db_message_list_admin_by_type($int_type_selected, $StartRec);
80
-while($row = db_fetch($Messages)) {
80
+while ($row = db_fetch($Messages)) {
81 81
   $row['FROM'] = htmlentities($row['FROM'], ENT_COMPAT, 'UTF-8');
82 82
   $row['OWNER_NAME'] = htmlentities($row['OWNER_NAME'], ENT_COMPAT, 'UTF-8');
83 83
   $row['TEXT'] = nl2br($row['TEXT']);
Please login to merge, or discard this patch.
admin/adm_flying_fleets.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
13 13
 
14 14
 // if ($user['authlevel'] < 2)
15
-if($user['authlevel'] < 3) {
15
+if ($user['authlevel'] < 3) {
16 16
   AdminMessage($lang['adm_err_denied']);
17 17
 }
18 18
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 //while($CurrentFleet = db_fetch($FlyingFleets))
23 23
 
24 24
 $all_flying_fleets = FleetList::dbGetFleetList();
25
-foreach($all_flying_fleets->_container as $fleet_id => $objFleet) {
25
+foreach ($all_flying_fleets->_container as $fleet_id => $objFleet) {
26 26
   $FleetOwner = db_user_by_id($objFleet->playerOwnerId);
27 27
   $TargetOwner = db_user_by_id($objFleet->target_owner_id);
28 28
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
   $fleet_data['fleet']['STAY_TIME_INT'] = $objFleet->time_mission_job_complete;
34 34
 
35 35
   $template->assign_block_vars('fleets', $fleet_data['fleet']);
36
-  foreach($fleet_data['ships'] as $ship_data) {
36
+  foreach ($fleet_data['ships'] as $ship_data) {
37 37
     $template->assign_block_vars('fleets.ships', $ship_data);
38 38
   }
39 39
 }
Please login to merge, or discard this patch.
admin/adm_log_main.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,25 +14,25 @@  discard block
 block discarded – undo
14 14
 
15 15
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
16 16
 
17
-if($user['authlevel'] < 3) {
17
+if ($user['authlevel'] < 3) {
18 18
   AdminMessage($lang['adm_err_denied']);
19 19
 }
20 20
 
21
-if($delete = sys_get_param_id('delete')) {
21
+if ($delete = sys_get_param_id('delete')) {
22 22
   db_log_delete_by_id($delete);
23
-} elseif(sys_get_param_str('delete_update_info')) {
23
+} elseif (sys_get_param_str('delete_update_info')) {
24 24
   db_log_delete_update_and_stat_calc();
25
-} elseif(sys_get_param_str('deleteall') == 'yes') {
25
+} elseif (sys_get_param_str('deleteall') == 'yes') {
26 26
 //  doquery("TRUNCATE TABLE `{{logs}}`");
27 27
 }
28 28
 
29
-if($detail = sys_get_param_id('detail')) {
29
+if ($detail = sys_get_param_id('detail')) {
30 30
   $template = gettemplate('admin/adm_log_main_detail', true);
31 31
 
32 32
   $errorInfo = db_log_get_by_id($detail);
33 33
   $error_dump = unserialize($errorInfo['log_dump']);
34
-  if(is_array($error_dump)) {
35
-    foreach($error_dump as $key => $value) {
34
+  if (is_array($error_dump)) {
35
+    foreach ($error_dump as $key => $value) {
36 36
       $v = array(
37 37
         'VAR_NAME'  => $key,
38 38
         'VAR_VALUE' => $key == 'query_log' ? $value : dump($value, $key)
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 
48 48
   $i = 0;
49 49
   $query = db_log_list_get_last_100();
50
-  while($u = db_fetch($query)) {
50
+  while ($u = db_fetch($query)) {
51 51
     $i++;
52 52
     $v = array();
53
-    foreach($u as $key => $value) {
53
+    foreach ($u as $key => $value) {
54 54
       $v[strtoupper($key)] = $value;
55 55
     }
56 56
     $template->assign_block_vars('error', $v);
Please login to merge, or discard this patch.
admin/ajax_maintenance.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 require('../includes/init.' . substr(strrchr(__FILE__, '.'), 1));
6 6
 
7
-if($user['authlevel'] < 3)
7
+if ($user['authlevel'] < 3)
8 8
 {
9 9
   message($lang['sys_noalloaw'], $lang['sys_noaccess']);
10 10
   die();
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 // [#] info_best_battles 1b0
21 21
 $best_reports = array();
22 22
 
23
-if(defined('MODULE_INFO_BEST_BATTLES_QUERY')) {
23
+if (defined('MODULE_INFO_BEST_BATTLES_QUERY')) {
24 24
   $query = db_ube_report_get_best_battles();
25
-  while($row = db_fetch($query)) {
25
+  while ($row = db_fetch($query)) {
26 26
     $best_reports[] = $row['ube_report_id'];
27 27
   }
28 28
 }
@@ -186,16 +186,16 @@  discard block
 block discarded – undo
186 186
 
187 187
 function sn_maintenance_pack_user_list($user_list) {
188 188
   $user_list = explode(',', $user_list);
189
-  foreach($user_list as $key => $user_id) {
190
-    if(!ceil(floatval($user_id))) {
189
+  foreach ($user_list as $key => $user_id) {
190
+    if (!ceil(floatval($user_id))) {
191 191
       unset($user_list[$key]);
192 192
     }
193 193
   }
194 194
 
195 195
   $result = array();
196
-  if(!empty($user_list)) {
196
+  if (!empty($user_list)) {
197 197
     $query = db_user_list_get_by_id_array($user_list);
198
-    while($row = db_fetch($query)) {
198
+    while ($row = db_fetch($query)) {
199 199
       $result[] = $row['id'];
200 200
     }
201 201
   }
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 $old_server_status == GAME_DISABLE_NONE ? $config->db_saveItem('game_disable', GAME_DISABLE_MAINTENANCE) : false;
211 211
 sn_db_transaction_commit();
212 212
 
213
-foreach($ques as $que_transaction) {
213
+foreach ($ques as $que_transaction) {
214 214
   sn_db_transaction_start();
215 215
 
216 216
   !is_array($que_transaction) ? $que_transaction = array($que_transaction) : false;
217
-  foreach($que_transaction as $que) {
217
+  foreach ($que_transaction as $que) {
218 218
     set_time_limit(120);
219
-    if(is_callable($que)) {
219
+    if (is_callable($que)) {
220 220
       $QryResult = call_user_func($que);
221 221
     } else {
222 222
       $QryResult = doquery($que);
Please login to merge, or discard this patch.
admin/adm_payment.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 require('../common.' . substr(strrchr(__FILE__, '.'), 1));
16 16
 
17
-if($user['authlevel'] < 3) {
17
+if ($user['authlevel'] < 3) {
18 18
   AdminMessage($lang['adm_err_denied']);
19 19
 }
20 20
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 );
26 26
 
27 27
 $query = db_payment_list_payers();
28
-while($row = db_fetch($query)) {
28
+while ($row = db_fetch($query)) {
29 29
   $payer_list[$row['payment_user_id']] = '[' . $row['payment_user_id'] . '] ' . $row['payment_user_name'];
30 30
 }
31 31
 tpl_assign_select($template, 'payer', $payer_list);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 );
36 36
 
37 37
 $query = db_payment_list_modules();
38
-while($row = db_fetch($query)) {
38
+while ($row = db_fetch($query)) {
39 39
   $module_list[$row['payment_module_name']] = $row['payment_module_name'];
40 40
 }
41 41
 tpl_assign_select($template, 'module', $module_list);
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 
51 51
 $query = db_payment_list_get($flt_payer, $flt_status, $flt_test, $flt_module);
52 52
 
53
-while($row = db_fetch($query)) {
53
+while ($row = db_fetch($query)) {
54 54
   $row2 = array();
55
-  foreach($row as $key => $value) {
55
+  foreach ($row as $key => $value) {
56 56
     $row2[strtoupper($key)] = $value;
57 57
   }
58 58
   $template->assign_block_vars('payment', $row2);
Please login to merge, or discard this patch.
simulator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 include('common.' . substr(strrchr(__FILE__, '.'), 1));
4 4
 
5
-if(sys_get_param_int('BE_DEBUG') && !defined('BE_DEBUG'))
5
+if (sys_get_param_int('BE_DEBUG') && !defined('BE_DEBUG'))
6 6
 {
7 7
   define('BE_DEBUG', true);
8 8
 }
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 $sym_defender = $_POST['defender'] ? $_POST['defender'] : array();
15 15
 $sym_attacker = $_POST['attacker'] ? $_POST['attacker'] : array();
16 16
 
17
-if($replay)
17
+if ($replay)
18 18
 {
19 19
   $unpacked = sn_ube_simulator_decode_replay($replay);
20 20
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
   $sym_attacker = array(1 => $sym_attacker);
28 28
 }
29 29
 
30
-if($_POST['submit'] || $execute)
30
+if ($_POST['submit'] || $execute)
31 31
 {
32 32
   $replay = sn_ube_simulator_encode_replay($sym_defender, 'D');
33 33
   $replay .= sn_ube_simulator_encode_replay($sym_attacker, 'A');
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
   $template = gettemplate('simulator', true);
41 41
   $techs_and_officers = array(TECH_WEAPON, TECH_SHIELD, TECH_ARMOR, MRC_ADMIRAL);
42 42
 
43
-  foreach($techs_and_officers as $tech_id)
43
+  foreach ($techs_and_officers as $tech_id)
44 44
   {
45
-    if(!$sym_attacker[1][$tech_id])
45
+    if (!$sym_attacker[1][$tech_id])
46 46
     {
47 47
       $sym_attacker[1][$tech_id] = mrc_get_level($user, false, $tech_id);
48 48
     }
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
     UNIT_GOVERNORS => array(MRC_FORTIFIER),
57 57
     UNIT_DEFENCE => sn_get_groups('defense_active'),
58 58
   );
59
-  foreach($show_groups as $unit_group_id => $unit_group)
59
+  foreach ($show_groups as $unit_group_id => $unit_group)
60 60
   {
61 61
     $template->assign_block_vars('simulator', array(
62 62
       'GROUP' => $unit_group_id,
63 63
       'NAME' => $lang['tech'][$unit_group_id],
64 64
     ));
65 65
 
66
-    foreach($unit_group as $unit_id)
66
+    foreach ($unit_group as $unit_id)
67 67
     {
68 68
       $tab++;
69 69
 
Please login to merge, or discard this patch.
includes/alliance/ali_internal_admin_diplomacy.inc 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
3
+if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
4 4
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
5 5
 }
6 6
 
7
-if(!$user_can_negotiate) {
7
+if (!$user_can_negotiate) {
8 8
   message($lang['Denied_access'], $lang['ali_dip_title']);
9 9
 }
10 10
 
@@ -15,24 +15,24 @@  discard block
 block discarded – undo
15 15
 
16 16
 
17 17
 
18
-if(sys_get_param_str('ali_dip_offer_make')) {
18
+if (sys_get_param_str('ali_dip_offer_make')) {
19 19
   $alliance_negotiation_relation = sys_get_param_str('alliance_negotiation_relation');
20
-  if(!array_key_exists($alliance_negotiation_relation, $sn_diplomacy_relation_list)) {
20
+  if (!array_key_exists($alliance_negotiation_relation, $sn_diplomacy_relation_list)) {
21 21
     message($lang['ali_dip_err_wrong_offer'], $page_title);
22 22
   }
23 23
 
24 24
   $alliance_negotiation_contr_ally_id = sys_get_param_id('alliance_negotiation_contr_ally_id');
25
-  if($alliance_negotiation_contr_ally_id == $user['ally_id']) {
25
+  if ($alliance_negotiation_contr_ally_id == $user['ally_id']) {
26 26
     message($lang['ali_dip_err_same_ally'], $page_title);
27 27
   }
28 28
 
29 29
   $contr_ally_row = db_ally_get_by_id($alliance_negotiation_contr_ally_id);
30
-  if(!$contr_ally_row) {
30
+  if (!$contr_ally_row) {
31 31
     message($lang['ali_dip_err_no_ally'], $page_title);
32 32
   }
33 33
 
34 34
   $relation_current_id = ali_relation($user['ally_id'], $alliance_negotiation_contr_ally_id);
35
-  if($alliance_negotiation_relation == $relation_current_id) {
35
+  if ($alliance_negotiation_relation == $relation_current_id) {
36 36
     message(sprintf($lang['ali_dip_err_offer_same'], $lang['ali_dip_relations'][$alliance_negotiation_relation]), $page_title);
37 37
   }
38 38
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
   $relation_new = $sn_diplomacy_relation_list[$alliance_negotiation_relation];
45 45
   $relation_current = $sn_diplomacy_relation_list[$relation_current_id];
46
-  if($relation_new['enter_delay'] == -1 || $relation_current['exit_delay'] == -1) {
46
+  if ($relation_new['enter_delay'] == -1 || $relation_current['exit_delay'] == -1) {
47 47
     sn_db_perform('{{alliance_negotiation}}',
48 48
       array(
49 49
         'alliance_negotiation_ally_id'         => $user['ally_id'],
@@ -70,33 +70,33 @@  discard block
 block discarded – undo
70 70
   }
71 71
 } else {
72 72
   $offer_id = sys_get_param_id('offer_id');
73
-  if($offer_id) {
73
+  if ($offer_id) {
74 74
     $offer_answer = sys_get_param_str('answer');
75 75
 
76 76
     $negotiation = db_ally_negotiation_get_by_offer_id($offer_id);
77
-    if(!$negotiation) {
77
+    if (!$negotiation) {
78 78
       message($lang['ali_dip_err_offer_none'], $page_title);
79
-    } elseif($negotiation['alliance_negotiation_ally_id'] != $user['ally_id'] && $negotiation['alliance_negotiation_contr_ally_id'] != $user['ally_id']) {
79
+    } elseif ($negotiation['alliance_negotiation_ally_id'] != $user['ally_id'] && $negotiation['alliance_negotiation_contr_ally_id'] != $user['ally_id']) {
80 80
       // TODO: Add log of hack attempt
81 81
       message($lang['ali_dip_err_offer_alien'], $page_title);
82
-    } elseif($negotiation['alliance_negotiation_ally_id'] == $user['ally_id']) {
83
-      if($offer_answer == 'accept') {
82
+    } elseif ($negotiation['alliance_negotiation_ally_id'] == $user['ally_id']) {
83
+      if ($offer_answer == 'accept') {
84 84
         // TODO: Add log of hack attempt
85 85
         message($lang['ali_dip_err_offer_accept_own'], $page_title);
86
-      } elseif($offer_answer == 'deny') {
86
+      } elseif ($offer_answer == 'deny') {
87 87
         db_ally_negotiation_delete_by_offer_id($offer_id);
88 88
       }
89 89
     } else {
90
-      if($offer_answer == 'accept') {
90
+      if ($offer_answer == 'accept') {
91 91
         $accept_offer = true;
92
-      } elseif($offer_answer == 'deny') {
92
+      } elseif ($offer_answer == 'deny') {
93 93
         db_ally_negotiation_update_status_1($offer_id);
94 94
       }
95 95
     }
96 96
   }
97 97
 }
98 98
 
99
-if($accept_offer) {
99
+if ($accept_offer) {
100 100
   sn_db_transaction_start();
101 101
 
102 102
   // TODO: Make sn_db_perform() multirow
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
   sn_db_transaction_commit();
126 126
 }
127 127
 
128
-foreach($sn_diplomacy_relation_list as $diplomacy_relation_id => $diplomacy_relation) {
128
+foreach ($sn_diplomacy_relation_list as $diplomacy_relation_id => $diplomacy_relation) {
129 129
   $template->assign_block_vars('relation', array(
130 130
     'ID'   => $diplomacy_relation_id,
131 131
     'TEXT' => $lang['ali_dip_relations'][$diplomacy_relation_id],
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 
136 136
 $query = db_ally_list_get_by_not_user_ally($user);
137
-while($alliance = db_fetch($query)) {
137
+while ($alliance = db_fetch($query)) {
138 138
   $template->assign_block_vars('alliance', array(
139 139
     'ID'   => $alliance['id'],
140 140
     'NAME' => js_safe_string($alliance['ally_name']),
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 }
144 144
 
145 145
 $query = db_ally_negotiation_list($user);
146
-while($offer = db_fetch($query)) {
146
+while ($offer = db_fetch($query)) {
147 147
   $template->assign_block_vars('offer', array(
148 148
     'ID'       => $offer['alliance_negotiation_id'],
149 149
     'NAME'     => $offer['ally_name'],
Please login to merge, or discard this patch.
includes/alliance/ali_external_create_ally.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 // Pretty Safe
3 3
 // TODO: Add ally_tag to usertable
4 4
 
5
-if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
5
+if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
6 6
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
7 7
 }
8 8
 
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 $ally_name_raw = sys_get_param_str_unsafe('name');
12 12
 $ally_name = db_escape($ally_name_raw);
13 13
 
14
-if($ally_tag) {
15
-  if(!$ally_name_raw || !$ally_tag_raw) {
14
+if ($ally_tag) {
15
+  if (!$ally_name_raw || !$ally_tag_raw) {
16 16
     message($lang['have_not_name'], $lang['make_alliance']);
17 17
   }
18 18
 
19 19
   $query = db_ally_get_by_name_or_tag($ally_tag, $ally_name);
20
-  if($query) {
20
+  if ($query) {
21 21
     message(str_replace('%s', $query['ally_tag'] == $ally_tag_raw ? $ally_tag_raw : $ally_name_raw, $lang['always_exist']), $lang['make_alliance']);
22 22
   }
23 23
 
Please login to merge, or discard this patch.