Test Failed
Push — trunk ( b3f953...fb036a )
by SuperNova.WS
05:47
created
language/es/system.mo.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -706,15 +706,15 @@
 block discarded – undo
706 706
   ],
707 707
 
708 708
   'months' => [
709
-     1 =>'enero',
710
-     2 =>'febrero',
711
-     3 =>'marzo',
712
-     4 =>'abril',
713
-     5 =>'mayo',
714
-     6 =>'junio',
715
-     7 =>'julio',
716
-     8 =>'agosto',
717
-     9 =>'septiembre',
709
+      1 =>'enero',
710
+      2 =>'febrero',
711
+      3 =>'marzo',
712
+      4 =>'abril',
713
+      5 =>'mayo',
714
+      6 =>'junio',
715
+      7 =>'julio',
716
+      8 =>'agosto',
717
+      9 =>'septiembre',
718 718
     10 =>'octubre',
719 719
     11 =>'noviembre',
720 720
     12 =>'diciembre'
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -977,7 +977,7 @@
 block discarded – undo
977 977
     REGISTER_ERROR_USERNAME_WRONG => 'Nombre de usuario incorrecto',
978 978
     REGISTER_ERROR_ACCOUNT_NAME_EXISTS => 'El nombre de cuenta ya está en uso. Intenta iniciar sesión con este nombre y tu contraseña o restablecer tu contraseña',
979 979
     REGISTER_ERROR_PASSWORD_INSECURE => 'Contraseña incorrecta. La contraseña debe tener al menos ' . PASSWORD_LENGTH_MIN . ' caracteres',
980
-    REGISTER_ERROR_USERNAME_SHORT => 'Nombre demasiado corto. Debe tener al menos ' . LOGIN_LENGTH_MIN. ' caracteres',
980
+    REGISTER_ERROR_USERNAME_SHORT => 'Nombre demasiado corto. Debe tener al menos ' . LOGIN_LENGTH_MIN . ' caracteres',
981 981
     REGISTER_ERROR_PASSWORD_DIFFERENT => 'La contraseña y la confirmación no coinciden. Verifica los datos',
982 982
     REGISTER_ERROR_EMAIL_EMPTY => 'El correo electrónico no puede estar vacío',
983 983
     REGISTER_ERROR_EMAIL_WRONG => 'El correo electrónico ingresado no es válido. Verifica la dirección o usa otra',
Please login to merge, or discard this patch.
language/es/options.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
 * DO NOT CHANGE
25 25
 */
26 26
 
27
-if (!defined('INSIDE')) die();
27
+if (!defined('INSIDE')) {
28
+  die();
29
+}
28 30
 
29 31
 $a_lang_array = [
30 32
   'opt_account' => 'Perfil',
Please login to merge, or discard this patch.
language/es/announce.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 
32 34
 $a_lang_array = array(
Please login to merge, or discard this patch.
language/es/tech.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 * DO NOT CHANGE
27 27
 */
28 28
 
29
-if (!defined('INSIDE')) die();
29
+if (!defined('INSIDE')) {
30
+  die();
31
+}
30 32
 
31 33
 
32 34
 $a_lang_array = (array(
Please login to merge, or discard this patch.
language/es/artifacts.mo.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 * DO NOT CHANGE
24 24
 */
25 25
 
26
-if (!defined('INSIDE')) die();
26
+if (!defined('INSIDE')) {
27
+  die();
28
+}
27 29
 
28 30
 $a_lang_array = array(
29 31
   'art_use'             => 'Usar artefacto',
Please login to merge, or discard this patch.
buddy.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,9 +60,11 @@  discard block
 block discarded – undo
60 60
           throw new exception('buddy_err_delete_alien', ERR_ERROR);
61 61
         }
62 62
 
63
-        if ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE) // Existing friendship
63
+        if ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_ACTIVE) {
64
+          // Existing friendship
64 65
         {
65 66
           $ex_friend_id = $buddy_row['BUDDY_SENDER_ID'] == $user['id'] ? $buddy_row['BUDDY_OWNER_ID'] : $buddy_row['BUDDY_SENDER_ID'];
67
+        }
66 68
 
67 69
           msg_send_simple_message($ex_friend_id, $user['id'], SN_TIME_NOW, MSG_TYPE_PLAYER, $user['username'], $lang['buddy_msg_unfriend_title'],
68 70
             sprintf($lang['buddy_msg_unfriend_text'], $user['username']));
@@ -70,15 +72,19 @@  discard block
 block discarded – undo
70 72
           doquery("DELETE FROM {{buddy}} WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
71 73
           db_mysql::db_transaction_commit();
72 74
           throw new exception('buddy_err_unfriend_none', ERR_NONE);
73
-        } elseif ($buddy_row['BUDDY_SENDER_ID'] == $user['id']) // Player's outcoming request - either denied or waiting
75
+        } elseif ($buddy_row['BUDDY_SENDER_ID'] == $user['id']) {
76
+          // Player's outcoming request - either denied or waiting
74 77
         {
75 78
           doquery("DELETE FROM {{buddy}} WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
79
+        }
76 80
           db_mysql::db_transaction_commit();
77 81
           throw new exception('buddy_err_delete_own', ERR_NONE);
78
-        } elseif ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_WAITING) // Deny incoming request
82
+        } elseif ($buddy_row['BUDDY_STATUS'] == BUDDY_REQUEST_WAITING) {
83
+          // Deny incoming request
79 84
         {
80 85
           msg_send_simple_message($buddy_row['BUDDY_SENDER_ID'], $user['id'], SN_TIME_NOW, MSG_TYPE_PLAYER, $user['username'], $lang['buddy_msg_deny_title'],
81 86
             sprintf($lang['buddy_msg_deny_text'], $user['username']));
87
+        }
82 88
 
83 89
           doquery("UPDATE {{buddy}} SET `BUDDY_STATUS` = " . BUDDY_REQUEST_DENIED . " WHERE `BUDDY_ID` = {$buddy_id} LIMIT 1;");
84 90
           db_mysql::db_transaction_commit();
Please login to merge, or discard this patch.
includes/alliance/ali_internal_admin.inc 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -4,26 +4,26 @@  discard block
 block discarded – undo
4 4
 use DBAL\db_mysql;
5 5
 use Old\Avatar;
6 6
 
7
-if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
7
+if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) {
8 8
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
9 9
 }
10 10
 
11
-if(!$user_admin) {
11
+if (!$user_admin) {
12 12
   SnTemplate::messageBox($lang['Denied_access'], $lang['ally_admin']);
13 13
 }
14 14
 
15 15
 $template = SnTemplate::gettemplate('ali_admin', $template);
16 16
 
17 17
 $text_list = array(
18
-  1 => array ('db_field' => 'ally_description', 'text_type' => 'Public_text_of_alliance'),
19
-  2 => array ('db_field' => 'ally_text', 'text_type' => 'Internal_text'),
20
-  3 => array ('db_field' => 'ally_request', 'text_type' => 'Show_of_request_text'),
18
+  1 => array('db_field' => 'ally_description', 'text_type' => 'Public_text_of_alliance'),
19
+  2 => array('db_field' => 'ally_text', 'text_type' => 'Internal_text'),
20
+  3 => array('db_field' => 'ally_request', 'text_type' => 'Show_of_request_text'),
21 21
 );
22 22
 
23 23
 $allyTextID = sys_get_param_int('t', 1);
24
-$allyTextID = ($allyTextID<1 || $allyTextID>3) ? 1 : $allyTextID;
24
+$allyTextID = ($allyTextID < 1 || $allyTextID > 3) ? 1 : $allyTextID;
25 25
 
26
-if(sys_get_param_str('isSaveOptions')) {
26
+if (sys_get_param_str('isSaveOptions')) {
27 27
   $new_image = $ally['ally_image'];
28 28
   $avatar_upload_result = Avatar::sys_avatar_upload($ally['id'], $new_image, 'ally');
29 29
   $template->assign_vars([
@@ -32,32 +32,32 @@  discard block
 block discarded – undo
32 32
   ]);
33 33
 
34 34
   $ally_changeset = array();
35
-  if(($new_tag = sys_get_param_str_unsafe('tag', $ally['ally_tag'])) && $new_tag != $ally['ally_tag']) {
35
+  if (($new_tag = sys_get_param_str_unsafe('tag', $ally['ally_tag'])) && $new_tag != $ally['ally_tag']) {
36 36
     $new_tag_unsafe = $new_tag;
37 37
     $new_tag = SN::$db->db_escape($new_tag);
38 38
     $isTaggedAllyExists = DBStaticAlly::db_ally_get_by_tag($new_tag);
39
-    if(!empty($isTaggedAllyExists)) {
39
+    if (!empty($isTaggedAllyExists)) {
40 40
       SnTemplate::messageBox(sprintf($lang['ally_message_tag_exists'], $new_tag_unsafe), '', 'alliance.php?mode=admin&edit=ally');
41 41
     }
42 42
     $ally_changeset[] = "`ally_tag`='{$new_tag}'";
43 43
     db_user_set_by_id($ally['ally_user_id'], "`username`='[{$new_tag}]'");
44 44
   }
45 45
 
46
-  if(($new_name = sys_get_param_str_unsafe('name', $ally['ally_name'])) && $new_name != $ally['ally_name']) {
46
+  if (($new_name = sys_get_param_str_unsafe('name', $ally['ally_name'])) && $new_name != $ally['ally_name']) {
47 47
     $new_name_unsafe = $new_name;
48 48
     $new_name = SN::$db->db_escape($new_name);
49 49
     $isTaggedAllyExists = DBStaticAlly::db_ally_get_by_name($new_name);
50
-    if(!empty($isTaggedAllyExists)) {
50
+    if (!empty($isTaggedAllyExists)) {
51 51
       SnTemplate::messageBox(sprintf($lang['ally_message_name_exists'], $new_name_unsafe), '', 'alliance.php?mode=admin&edit=ally');
52 52
     }
53 53
     $ally_changeset[] = "`ally_name`='{$new_name}'";
54 54
   }
55 55
 
56
-  if(($new_owner_rank = sys_get_param_str_unsafe('owner_range', $ally['ally_owner_range'])) && $new_owner_rank != $ally['ally_owner_range']) {
56
+  if (($new_owner_rank = sys_get_param_str_unsafe('owner_range', $ally['ally_owner_range'])) && $new_owner_rank != $ally['ally_owner_range']) {
57 57
     $new_owner_rank = SN::$db->db_escape($new_owner_rank);
58 58
     $ally_changeset[] = "`ally_owner_range` = '{$new_owner_rank}'";
59 59
   }
60
-  if(($new_web = sys_get_param_str_unsafe('web', $ally['ally_web'])) && $new_web != $ally['ally_web']) {
60
+  if (($new_web = sys_get_param_str_unsafe('web', $ally['ally_web'])) && $new_web != $ally['ally_web']) {
61 61
     $new_web = SN::$db->db_escape($new_web);
62 62
     $ally_changeset[] = "`ally_web` = '{$new_web}'";
63 63
   }
@@ -66,31 +66,31 @@  discard block
 block discarded – undo
66 66
 //  if(($new_request = sys_get_param_int('request_notallow', $ally['ally_request_notallow'])) && $new_request != $ally['ally_request_notallow']) {
67 67
 //    $ally_changeset[] = "`ally_request_notallow` = '{$new_request}'";
68 68
 //  }
69
-  if($new_image != $ally['ally_image']) {
69
+  if ($new_image != $ally['ally_image']) {
70 70
     $new_image = intval($new_image);
71 71
     $ally_changeset[] = "`ally_image` = '{$new_image}'";
72 72
   }
73 73
 
74
-  if(!empty($ally_changeset)) {
74
+  if (!empty($ally_changeset)) {
75 75
     doquery("UPDATE {{alliance}} SET " . implode(',', $ally_changeset) . " WHERE `id`='{$ally['id']}' LIMIT 1;");
76 76
     sys_redirect('alliance.php?mode=admin&edit=ally');
77 77
   }
78 78
 }
79
-elseif(sys_get_param_str('isSaveText'))
79
+elseif (sys_get_param_str('isSaveText'))
80 80
 {
81 81
   $text = sys_get_param_str_both('text');
82 82
   doquery("UPDATE {{alliance}} SET `{$text_list[$allyTextID]['db_field']}`='{$text['safe']}' WHERE `id`='{$ally['id']}';");
83 83
   $ally[$text_list[$allyTextID]['db_field']] = $text['unsafe'];
84 84
 }
85
-elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader'))
85
+elseif (sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader'))
86 86
 {
87
-  if(!$isAllyOwner)
87
+  if (!$isAllyOwner)
88 88
   {
89 89
     SnTemplate::messageBox($lang['Denied_access'], $lang['ally_admin']);
90 90
   }
91 91
 
92 92
   $newLeader = db_user_by_id($idNewLeader, false);
93
-  if($newLeader['ally_id'] == $user['ally_id'])
93
+  if ($newLeader['ally_id'] == $user['ally_id'])
94 94
   {
95 95
     db_mysql::db_transaction_start();
96 96
     db_user_set_by_id($user['id'], "`ally_rank_id`='0'");
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
     sys_redirect('alliance.php');
101 101
   }
102 102
 }
103
-elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband'))
103
+elseif (sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband'))
104 104
 {
105
-  if(!$isAllyOwner)
105
+  if (!$isAllyOwner)
106 106
   {
107 107
     SnTemplate::messageBox($lang['Denied_access'], $lang['ally_admin']);
108 108
   }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
   'ally_name' => htmlspecialchars($ally['ally_name']),
126 126
   'ally_tag' => htmlspecialchars($ally['ally_tag']),
127 127
   'ally_web' => htmlspecialchars($ally['ally_web']),
128
-  'ally_request_notallow_0' => (( $ally['ally_request_notallow']) ? ' SELECTED' : ''),
128
+  'ally_request_notallow_0' => (($ally['ally_request_notallow']) ? ' SELECTED' : ''),
129 129
   'ally_request_notallow_1' => ((!$ally['ally_request_notallow']) ? ' SELECTED' : ''),
130 130
   'ally_owner_range' => htmlspecialchars($ally['ally_owner_range']),
131 131
   'hideNotOwner' => $ally['ally_owner'] != $user['id'] ? 'display: hide;' : '',
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 {
135 135
   $userAllyAdmins = db_user_list("`ally_id`= {$ally['id']}", false, '`id`, `username`');
136 136
   unset($tmp);
137
-  foreach($userAllyAdmins as $userAllyAdmin)
137
+  foreach ($userAllyAdmins as $userAllyAdmin)
138 138
   {
139 139
     $tmp .= "<option value={$userAllyAdmin['id']}>{$userAllyAdmin['username']}</option>";
140 140
   }
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
   $template->assign_var('adminMembers', $tmp);
143 143
 }
144 144
 
145
-foreach($sn_ali_admin_internal as $sn_ali_admin_action => $sn_ali_admin_action_locale)
145
+foreach ($sn_ali_admin_internal as $sn_ali_admin_action => $sn_ali_admin_action_locale)
146 146
 {
147
-  if(!$sn_ali_admin_action_locale['title'])
147
+  if (!$sn_ali_admin_action_locale['title'])
148 148
   {
149 149
     continue;
150 150
   }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,14 +75,12 @@  discard block
 block discarded – undo
75 75
     doquery("UPDATE {{alliance}} SET " . implode(',', $ally_changeset) . " WHERE `id`='{$ally['id']}' LIMIT 1;");
76 76
     sys_redirect('alliance.php?mode=admin&edit=ally');
77 77
   }
78
-}
79
-elseif(sys_get_param_str('isSaveText'))
78
+} elseif(sys_get_param_str('isSaveText'))
80 79
 {
81 80
   $text = sys_get_param_str_both('text');
82 81
   doquery("UPDATE {{alliance}} SET `{$text_list[$allyTextID]['db_field']}`='{$text['safe']}' WHERE `id`='{$ally['id']}';");
83 82
   $ally[$text_list[$allyTextID]['db_field']] = $text['unsafe'];
84
-}
85
-elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader'))
83
+} elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader'))
86 84
 {
87 85
   if(!$isAllyOwner)
88 86
   {
@@ -99,8 +97,7 @@  discard block
 block discarded – undo
99 97
     db_mysql::db_transaction_commit();
100 98
     sys_redirect('alliance.php');
101 99
   }
102
-}
103
-elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband'))
100
+} elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband'))
104 101
 {
105 102
   if(!$isAllyOwner)
106 103
   {
Please login to merge, or discard this patch.
includes/includes/market_trader.inc 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use DBAL\db_mysql;
4 4
 
5
-if((!defined('SN_IN_MARKET') || SN_IN_MARKET !== true) && (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true)) {
5
+if ((!defined('SN_IN_MARKET') || SN_IN_MARKET !== true) && (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true)) {
6 6
   $debug->error("Attempt to call market page mode {$mode} directly - not from market.php", 'Forbidden', 403);
7 7
 }
8 8
 
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
   // $dm_db_name = pname_resource_name(RES_DARK_MATTER);
31 31
   $exchangeTo = in_array($exchangeTo = sys_get_param_int('exchangeTo'), sn_get_groups('resources_trader')) ? $exchangeTo : 0;
32
-  if($exchangeTo && is_array($tradeList = $_POST['spend'])) {
32
+  if ($exchangeTo && is_array($tradeList = $_POST['spend'])) {
33 33
     $value = 0;
34 34
     $qry = array();
35 35
 
36 36
     db_mysql::db_transaction_start();
37
-    if($planetrow['id_owner']) {
37
+    if ($planetrow['id_owner']) {
38 38
       $global_data = sys_o_get_updated($planetrow['id_owner'], $planetrow['id'], SN_TIME_NOW);
39 39
       $planetrow = $global_data['planet'];
40 40
     }
@@ -43,27 +43,27 @@  discard block
 block discarded – undo
43 43
       $user = db_user_by_id($user['id'], true);
44 44
     }
45 45
 
46
-    foreach(sn_get_groups('resources_trader') as $resource_id) {
46
+    foreach (sn_get_groups('resources_trader') as $resource_id) {
47 47
       $amount = floatval($tradeList[$resource_id]);
48
-      if($amount < 0) {
48
+      if ($amount < 0) {
49 49
         $debug->error('Trying to supply negative resource amount on Black Market Page', 'Hack Attempt', 305);
50 50
       }
51 51
 
52
-      if($resource_id == RES_DARK_MATTER && $exchangeTo == RES_DARK_MATTER) {
52
+      if ($resource_id == RES_DARK_MATTER && $exchangeTo == RES_DARK_MATTER) {
53 53
         continue;
54 54
       }
55 55
 
56 56
       $resource_db_name = pname_resource_name($resource_id);
57
-      if($exchangeTo == RES_DARK_MATTER) {
57
+      if ($exchangeTo == RES_DARK_MATTER) {
58 58
         $sign = '+';
59 59
         $amount = floor($tradeList[RES_DARK_MATTER] / 3 * $rates[RES_DARK_MATTER] / $rates[$resource_id]);
60 60
         $value += $amount;
61 61
       } else {
62 62
         $value += floor($amount * $rates[$resource_id] / $rates[$exchangeTo]);
63
-        if($resource_id == RES_DARK_MATTER) {
63
+        if ($resource_id == RES_DARK_MATTER) {
64 64
           $amount = 0;
65 65
         } else {
66
-          if(mrc_get_level($user, $planetrow, $resource_id, true) < $amount) {
66
+          if (mrc_get_level($user, $planetrow, $resource_id, true) < $amount) {
67 67
             $intError = MARKET_NO_RESOURCES;
68 68
             break;
69 69
           }
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
         }
73 73
       }
74 74
 
75
-      if($amount) {
75
+      if ($amount) {
76 76
         $qry[] = "`{$resource_db_name}` = `{$resource_db_name}` {$sign} {$amount}";
77 77
       }
78 78
     }
79 79
 
80
-    if($exchangeTo != RES_DARK_MATTER) {
80
+    if ($exchangeTo != RES_DARK_MATTER) {
81 81
       $amount = floor($value);
82 82
       $exchange_to_db_name = pname_resource_name($exchangeTo);
83 83
       $qry[] = "`{$exchange_to_db_name}` = `{$exchange_to_db_name}` + {$amount}";
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     $intError = $value <= 0 ? MARKET_ZERO_DEAL : $intError;
89 89
     $intError = mrc_get_level($user, null, RES_DARK_MATTER) < $operation_cost ? MARKET_NO_DM : $intError;
90 90
 
91
-    if($intError == MARKET_DEAL) {
91
+    if ($intError == MARKET_DEAL) {
92 92
       $qry = implode(', ', $qry);
93 93
       $table = $planetrow['id_owner'] ? 'planets' : 'users';
94 94
 
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
     'EXCHANGE_TO_RESOURCE_ID' => $exchangeTo,
112 112
   ));
113 113
 
114
-  foreach(sn_get_groups('resources_trader') as $resource_id) {
115
-    if($resource_id == RES_DARK_MATTER) {
114
+  foreach (sn_get_groups('resources_trader') as $resource_id) {
115
+    if ($resource_id == RES_DARK_MATTER) {
116 116
       $amount = floor(mrc_get_level($user, null, RES_DARK_MATTER) - $config->rpg_cost_trader);
117 117
     } else {
118 118
       $amount = floor(mrc_get_level($user, $planetrow, $resource_id));
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@
 block discarded – undo
37 37
     if($planetrow['id_owner']) {
38 38
       $global_data = sys_o_get_updated($planetrow['id_owner'], $planetrow['id'], SN_TIME_NOW);
39 39
       $planetrow = $global_data['planet'];
40
-    }
41
-    else {
40
+    } else {
42 41
       // Locking user record
43 42
       $user = db_user_by_id($user['id'], true);
44 43
     }
Please login to merge, or discard this patch.
includes/includes/uni_rename.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
     $uni_galaxy = sys_get_param_int('galaxy', $planetrow['galaxy']);
10 10
     $uni_system = sys_get_param_int('system');
11 11
 
12
-    if($uni_galaxy < 1 || $uni_galaxy > $config->game_maxGalaxy)
12
+    if ($uni_galaxy < 1 || $uni_galaxy > $config->game_maxGalaxy)
13 13
     {
14 14
       throw new exception($lang['uni_msg_error_wrong_galaxy'], ERR_ERROR);
15 15
     }
16 16
 
17
-    if($uni_system < 0 || $uni_system > $config->game_maxSystem)
17
+    if ($uni_system < 0 || $uni_system > $config->game_maxSystem)
18 18
     {
19 19
       throw new exception($lang['uni_msg_error_wrong_system'], ERR_ERROR);
20 20
     }
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
     $uni_row['universe_price'] += $uni_system ? $config->uni_price_system : $config->uni_price_galaxy;
24 24
     $uni_row['universe_name'] = strip_tags($uni_row['universe_name'] ? $uni_row['universe_name'] : ($uni_system ? "{$lang['sys_system']} [{$uni_galaxy}:{$uni_system}]" : "{$lang['sys_galaxy']} {$uni_galaxy}"));
25 25
 
26
-    if(sys_get_param_str('uni_name_submit'))
26
+    if (sys_get_param_str('uni_name_submit'))
27 27
     {
28 28
       $uni_row['universe_name'] = strip_tags(sys_get_param_str('uni_name'));
29 29
 
30 30
       $uni_price = sys_get_param_float('uni_price');
31
-      if($uni_price < $uni_row['universe_price'])
31
+      if ($uni_price < $uni_row['universe_price'])
32 32
       {
33 33
         throw new exception($lang['uni_msg_error_low_price'], ERR_ERROR);
34 34
       }
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
       db_mysql::db_transaction_start();
38 38
       $user = db_user_by_id($user['id'], true);
39 39
       // if($user[get_unit_param(RES_DARK_MATTER, P_NAME)] < $uni_price)
40
-      if(mrc_get_level($user, null, RES_DARK_MATTER) < $uni_price)
40
+      if (mrc_get_level($user, null, RES_DARK_MATTER) < $uni_price)
41 41
       {
42 42
         throw new exception($lang['uni_msg_error_no_dm'], ERR_ERROR);
43 43
       }
44 44
 
45
-      if(!rpg_points_change($user['id'], RPG_RENAME, -$uni_price, "Renaming [{$uni_galaxy}:{$uni_system}] to " . sys_get_param_str_unsafe('uni_name')))
45
+      if (!rpg_points_change($user['id'], RPG_RENAME, -$uni_price, "Renaming [{$uni_galaxy}:{$uni_system}] to " . sys_get_param_str_unsafe('uni_name')))
46 46
       {
47 47
         throw new exception($lang['sys_msg_err_update_dm'], ERR_ERROR);
48 48
       }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
       db_mysql::db_transaction_commit();
53 53
       sys_redirect("galaxy.php?mode=name&galaxy={$uni_galaxy}&system={$uni_system}");
54 54
     }
55
-  }
56
-  catch (exception $e)
55
+  } catch (exception $e)
57 56
   {
58 57
     db_mysql::db_transaction_rollback();
59 58
     $template->assign_block_vars('result', array(
Please login to merge, or discard this patch.