Test Failed
Branch trunk (c9c94d)
by SuperNova.WS
10:03 queued 05:45
created
scheduler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
 
25 25
 // require_once('includes/includes/scheduler_process.php');
26 26
 
27
-if(($result = scheduler_process()) && !defined('IN_ADMIN')) {
27
+if (($result = scheduler_process()) && !defined('IN_ADMIN')) {
28 28
   $result = htmlspecialchars($result, ENT_QUOTES, 'UTF-8');
29 29
   print(json_encode($result));
30 30
 }
31 31
 
32
-if(!defined('IN_ADMIN')) {
32
+if (!defined('IN_ADMIN')) {
33 33
   die();
34 34
 }
Please login to merge, or discard this patch.
messages.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 $mode = sys_get_param_str('msg_delete') ? 'delete' : sys_get_param_str('mode');
44 44
 $current_class = sys_get_param_int('message_class');
45
-if(!isset($sn_message_class_list[$current_class])) {
45
+if (!isset($sn_message_class_list[$current_class])) {
46 46
   $current_class = 0;
47 47
   $mode = '';
48 48
 }
@@ -53,48 +53,48 @@  discard block
 block discarded – undo
53 53
     $template = gettemplate('msg_message_compose', true);
54 54
 
55 55
     $recipient_name = sys_get_param_str_unsafe('recipient_name');
56
-    if($recipient_name) {
56
+    if ($recipient_name) {
57 57
       $recipient_row = db_user_by_username($recipient_name);
58 58
     }
59 59
 
60
-    if(!$recipient_row) {
60
+    if (!$recipient_row) {
61 61
       $recipient_id = sys_get_param_id('id');
62 62
       $recipient_row = db_user_by_id($recipient_id);
63
-      if(!$recipient_row) {
63
+      if (!$recipient_row) {
64 64
         $recipient_id = 0;
65 65
       }
66 66
     }
67 67
 
68
-    if($recipient_row) {
68
+    if ($recipient_row) {
69 69
       $recipient_id = $recipient_row['id'];
70 70
       $recipient_name = $recipient_row['username'];
71 71
     }
72 72
 
73
-    if($recipient_id == $user['id']) {
73
+    if ($recipient_id == $user['id']) {
74 74
       $error_list[] = array('MESSAGE' => $lang['msg_err_self_send'], 'STATUS' => ERR_ERROR);
75 75
     }
76 76
 
77 77
     $re = 0;
78 78
     $subject = sys_get_param_str('subject');
79
-    while(strpos($subject, $lang['msg_answer_prefix']) !== false) {
79
+    while (strpos($subject, $lang['msg_answer_prefix']) !== false) {
80 80
       $subject = substr($subject, strlen($lang['msg_answer_prefix']));
81 81
       $re++;
82 82
     }
83 83
     $re ? $subject = $lang['msg_answer_prefix'] . $subject : false;
84 84
 
85
-    if(sys_get_param_str('msg_send')) {
85
+    if (sys_get_param_str('msg_send')) {
86 86
       $subject = $subject ? $subject : $lang['msg_subject_default'];
87 87
 
88
-      if(!$recipient_id) {
88
+      if (!$recipient_id) {
89 89
         $error_list[] = array('MESSAGE' => $lang['msg_err_player_not_found'], 'STATUS' => ERR_ERROR);
90 90
       }
91 91
 
92 92
       $text = sys_get_param_str('text');
93
-      if(!$text) {
93
+      if (!$text) {
94 94
         $error_list[] = array('MESSAGE' => $lang['msg_err_no_text'], 'STATUS' => ERR_ERROR);
95 95
       }
96 96
 
97
-      if(empty($error_list)) {
97
+      if (empty($error_list)) {
98 98
         $error_list[] = array('MESSAGE' => $lang['msg_not_message_sent'], 'STATUS' => ERR_NONE);
99 99
 
100 100
         $user_safe_name = db_escape($user['username']);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         //$recipient_id = 0;
105 105
         //$recipient_name = '';
106 106
         //$subject = '';
107
-        $text    = '';
107
+        $text = '';
108 108
 
109 109
         $msg_sent = true;
110 110
       } else {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
       'TEXT'           => htmlspecialchars($text),
124 124
     ));
125 125
 
126
-    foreach($error_list as $error_message) {
126
+    foreach ($error_list as $error_message) {
127 127
       $template->assign_block_vars('result', $error_message);
128 128
     }
129 129
 
@@ -153,25 +153,25 @@  discard block
 block discarded – undo
153 153
 
154 154
     $message_range = sys_get_param_str('message_range');
155 155
 
156
-    switch($message_range) {
156
+    switch ($message_range) {
157 157
       case 'unchecked':
158 158
       case 'checked':
159 159
         $marked_message_list = sys_get_param('mark', array());
160
-        if($message_range == 'checked' && empty($marked_message_list)) {
160
+        if ($message_range == 'checked' && empty($marked_message_list)) {
161 161
           break;
162 162
         }
163 163
 
164 164
         $query_add = implode(',', $marked_message_list);
165
-        if($query_add) {
165
+        if ($query_add) {
166 166
           $query_add = "IN ({$query_add})";
167
-          if($message_range == 'unchecked') {
167
+          if ($message_range == 'unchecked') {
168 168
             $query_add = "NOT {$query_add}";
169 169
           }
170 170
           $query_add = " AND `message_id` {$query_add}";
171 171
         }
172 172
 
173 173
       case 'class':
174
-        if($current_class != MSG_TYPE_OUTBOX && $current_class != MSG_TYPE_NEW) {
174
+        if ($current_class != MSG_TYPE_OUTBOX && $current_class != MSG_TYPE_NEW) {
175 175
           $query_add .= " AND `message_type` = {$current_class}";
176 176
         }
177 177
       case 'all':
@@ -179,19 +179,19 @@  discard block
 block discarded – undo
179 179
       break;
180 180
     }
181 181
 
182
-    if($query_add) {
182
+    if ($query_add) {
183 183
       $query_add = $query_add === true ? '' : $query_add;
184 184
       doquery("DELETE FROM `{{messages}}` WHERE `message_owner` = '{$user['id']}'{$query_add};");
185 185
     }
186 186
 
187 187
   case 'show':
188
-    if($current_class == MSG_TYPE_OUTBOX) {
188
+    if ($current_class == MSG_TYPE_OUTBOX) {
189 189
       $message_query = db_message_list_outbox_by_user_id($user['id']);
190 190
     } else {
191 191
       if ($current_class == MSG_TYPE_NEW) {
192 192
         $SubUpdateQry = array();
193
-        foreach($sn_message_class_list as $message_class_id => $message_class) {
194
-          if($message_class_id != MSG_TYPE_OUTBOX) {
193
+        foreach ($sn_message_class_list as $message_class_id => $message_class) {
194
+          if ($message_class_id != MSG_TYPE_OUTBOX) {
195 195
             $SubUpdateQry[] = "`{$message_class['name']}` = '0'";
196 196
             $user[$message_class['name']] = 0;
197 197
           }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
       $message_query = doquery($message_query);
211 211
     }
212 212
 
213
-    if(sys_get_param_int('return')) {
213
+    if (sys_get_param_int('return')) {
214 214
       header('Location: messages.php');
215 215
       die();
216 216
     }
@@ -239,11 +239,11 @@  discard block
 block discarded – undo
239 239
   break;
240 240
 }
241 241
 
242
-if(!$template) {
242
+if (!$template) {
243 243
   $template = gettemplate('msg_message_class', true);
244 244
 
245 245
   $query = doquery("SELECT message_owner, message_type, COUNT(message_owner) AS message_count FROM {{messages}} WHERE `message_owner` = {$user['id']} GROUP BY message_owner, message_type ORDER BY message_owner ASC, message_type;");
246
-  while($message_row = db_fetch($query)) {
246
+  while ($message_row = db_fetch($query)) {
247 247
     $messages_total[$message_row['message_type']]  = $message_row['message_count'];
248 248
     $messages_total[MSG_TYPE_NEW]                 += $message_row['message_count'];
249 249
   }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
   $query = doquery("SELECT COUNT(message_sender) AS message_count FROM {{messages}} WHERE `message_sender` = '{$user['id']}' AND message_type = 1 GROUP BY message_sender;", '', true);
252 252
   $messages_total[MSG_TYPE_OUTBOX] = intval($query['message_count']);
253 253
 
254
-  foreach($sn_message_class_list as $message_class_id => $message_class) {
254
+  foreach ($sn_message_class_list as $message_class_id => $message_class) {
255 255
     $template->assign_block_vars('message_class', array(
256 256
       'ID'     => $message_class_id,
257 257
       'STYLE'  => $message_class['name'],
Please login to merge, or discard this patch.
includes/general/math.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 function geometry_progression_sum($n, $b1, $q) {
4
-  return $q != 1 ? ($b1 * (pow($q, $n) - 1)/($q - 1)) : ($n * $b1);
4
+  return $q != 1 ? ($b1 * (pow($q, $n) - 1) / ($q - 1)) : ($n * $b1);
5 5
 }
6 6
 
7 7
 function sn_floor($value)
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
  *
44 44
  * @return float|int
45 45
  */
46
-function sn_rand_gauss_range($range_start, $range_end, $round = true, $strict = 4, $cut_extreme = false)  {
47
-  if($cut_extreme) {
46
+function sn_rand_gauss_range($range_start, $range_end, $round = true, $strict = 4, $cut_extreme = false) {
47
+  if ($cut_extreme) {
48 48
     $range_start--;
49 49
     $range_end++;
50 50
   }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 {
61 61
   $args = func_get_args();
62 62
 
63
-  switch(func_num_args())
63
+  switch (func_num_args())
64 64
   {
65 65
     case 0:
66 66
       // trigger_error('median() requires at least one parameter',E_USER_WARNING);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     // fallthrough
73 73
 
74 74
     default:
75
-      if(!is_array($args))
75
+      if (!is_array($args))
76 76
       {
77 77
         // trigger_error('median() requires a list of numbers to operate on or an array of numbers', E_USER_NOTICE);
78 78
         return false;
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
       $n = count($args);
84 84
       $h = intval($n / 2);
85 85
 
86
-      if($n % 2 == 0)
86
+      if ($n % 2 == 0)
87 87
       {
88
-        $median = ($args[$h] + $args[$h-1]) / 2;
88
+        $median = ($args[$h] + $args[$h - 1]) / 2;
89 89
       }
90 90
       else
91 91
       {
@@ -103,47 +103,47 @@  discard block
 block discarded – undo
103 103
 }
104 104
 function linear_calc(&$linear, $from = 0, $debug = false)
105 105
 {
106
-  for($i = $from; $i < count($linear); $i++)
106
+  for ($i = $from; $i < count($linear); $i++)
107 107
   {
108 108
     $eq = &$linear[$i];
109
-    for($j = count($eq) - 1; $j >= $from; $j--)
109
+    for ($j = count($eq) - 1; $j >= $from; $j--)
110 110
     {
111 111
       $eq[$j] /= $eq[$from];
112 112
     }
113 113
   }
114
-  if($debug) pdump($linear, 'Нормализовано по х' . $from);
114
+  if ($debug) pdump($linear, 'Нормализовано по х' . $from);
115 115
 
116
-  for($i = $from + 1; $i < count($linear); $i++)
116
+  for ($i = $from + 1; $i < count($linear); $i++)
117 117
   {
118 118
     $eq = &$linear[$i];
119
-    for($j = count($eq) - 1; $j >= $from; $j--)
119
+    for ($j = count($eq) - 1; $j >= $from; $j--)
120 120
     {
121 121
       $eq[$j] -= $linear[$from][$j];
122 122
     }
123 123
   }
124
-  if($debug) pdump($linear, 'Подставили х' . $from);
124
+  if ($debug) pdump($linear, 'Подставили х' . $from);
125 125
 
126
-  if($from < count($linear) - 1)
126
+  if ($from < count($linear) - 1)
127 127
   {
128 128
     linear_calc($linear, $from + 1, $debug);
129 129
   }
130 130
 
131
-  if($from)
131
+  if ($from)
132 132
   {
133
-    for($i = 0; $i < $from; $i++)
133
+    for ($i = 0; $i < $from; $i++)
134 134
     {
135 135
       $eq = &$linear[$i];
136
-      for($j = count($eq) - 1; $j >= $from; $j--)
136
+      for ($j = count($eq) - 1; $j >= $from; $j--)
137 137
       {
138 138
         $eq[$j] = $eq[$j] - $eq[$from] * $linear[$from][$j];
139 139
       }
140 140
     }
141
-    if($debug) pdump($linear, 'Подставили обратно х' . $from);
141
+    if ($debug) pdump($linear, 'Подставили обратно х' . $from);
142 142
   }
143 143
   else
144 144
   {
145
-    if($debug) pdump($linear, 'Результат' . $from);
146
-    foreach($linear as $index => &$eq)
145
+    if ($debug) pdump($linear, 'Результат' . $from);
146
+    foreach ($linear as $index => &$eq)
147 147
     {
148 148
       pdump($eq[count($linear)], 'x' . $index);
149 149
     }
Please login to merge, or discard this patch.
includes/vars_menu.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
-if(!defined('INSIDE')) {
3
+if (!defined('INSIDE')) {
4 4
   die('Hack attempt!');
5 5
 }
6 6
 
Please login to merge, or discard this patch.
includes/db/db_queries_users.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     "SELECT `id` AS `ID`, `username` AS `NAME`, `ally_name` AS `ALLY`, `total_points` AS `STAT_POINTS`,
84 84
       `onlinetime` AS `ACTIVITY`
85 85
     FROM {{users}}
86
-    WHERE `onlinetime` >= ". (SN_TIME_NOW - $config->game_users_online_timeout) ." ORDER BY user_as_ally, `". $TypeSort ."` ASC;");
86
+    WHERE `onlinetime` >= ". (SN_TIME_NOW - $config->game_users_online_timeout) . " ORDER BY user_as_ally, `" . $TypeSort . "` ASC;");
87 87
 }
88 88
 
89 89
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
   return doquery("SELECT u.*, COUNT(r.id) AS referral_count, SUM(r.dark_matter) AS referral_dm FROM {{users}} as u
99 99
     LEFT JOIN {{referrals}} as r on r.id_partner = u.id
100 100
     WHERE" .
101
-    ($online ? " `onlinetime` >= ". (SN_TIME_NOW - $config->game_users_online_timeout) : ' user_as_ally IS NULL') .
101
+    ($online ? " `onlinetime` >= " . (SN_TIME_NOW - $config->game_users_online_timeout) : ' user_as_ally IS NULL') .
102 102
     " GROUP BY u.id
103 103
     ORDER BY user_as_ally, {$sort} ASC");
104 104
 }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
   !is_array($user_id_list) ? $user_id_list = array($user_id_list) : false;
115 115
 
116 116
   $user_list = array();
117
-  foreach($user_id_list as $user_id_unsafe) {
117
+  foreach ($user_id_list as $user_id_unsafe) {
118 118
     $user = db_user_by_id($user_id_unsafe);
119 119
     !empty($user) ? $user_list[$user_id_unsafe] = $user : false;
120 120
   }
Please login to merge, or discard this patch.
includes/alliance/ali_external_search.inc 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
-if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true)
3
+if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true)
4 4
 {
5 5
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
6 6
 }
Please login to merge, or discard this patch.
includes/alliance/ali_internal_members.inc 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  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
 {
5 5
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
6 6
 }
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 */
11 11
 // Changing rank for single user
12 12
 $id_user = sys_get_param_id('id_user');
13
-if(isset($_GET['id_rank']))
13
+if (isset($_GET['id_rank']))
14 14
 {
15 15
   $id_rank = sys_get_param_int('id_rank');
16 16
 }
17
-if($id_user && isset($id_rank) && $user_admin){
17
+if ($id_user && isset($id_rank) && $user_admin) {
18 18
   db_user_set_by_id($id_user, "`ally_rank_id` = {$id_rank}");
19 19
 }
20 20
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 }
43 43
 
44 44
 $sort1 = sys_get_param_int('sort1');
45
-if($sort1>5 || $sort1<0) $sort1 = 0;
45
+if ($sort1 > 5 || $sort1 < 0) $sort1 = 0;
46 46
 $sort1s = array(
47 47
   0 => '`ally_rank_id` %1$s;',
48 48
   1 => '`username` %1$s;',
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
   'id, username, galaxy, system, planet, onlinetime, ally_rank_id, ally_register_time, total_points');
59 59
 
60 60
 // while ($userRow = db_fetch($userList))
61
-foreach($userList as $userRow)
61
+foreach ($userList as $userRow)
62 62
 {
63 63
   $i++;
64 64
   if (!isset($ranks[$userRow['ally_rank_id']]))
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
 
69 69
   if ($ally['ally_owner'] == $userRow['id'])
70 70
   {
71
-    $ally_range = ($ally['ally_owner_range'])?$ally['ally_owner_range']:$lang['Founder'];
71
+    $ally_range = ($ally['ally_owner_range']) ? $ally['ally_owner_range'] : $lang['Founder'];
72 72
   }
73 73
   else
74 74
   {
75
-    if($user_admin)
75
+    if ($user_admin)
76 76
     {
77 77
       $ally_range = '<select onchange="window.location=\'alliance.php?mode=admin&edit=members&id_user=' . $userRow['id'] . '&id_rank=\' + this.value">';
78 78
 
79
-      foreach($ranks as $rankID => $rankArray){
79
+      foreach ($ranks as $rankID => $rankArray) {
80 80
         $ally_range .= '<option value="' . $rankID . '"';
81
-        if($rankID == $userRow['ally_rank_id'])
81
+        if ($rankID == $userRow['ally_rank_id'])
82 82
           $ally_range .= " selected";
83 83
         $ally_range .= '>' . $rankArray['name'];
84 84
         $ally_range .= '</option>';
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
   }
93 93
 
94 94
   $last_active = time() - $userRow["onlinetime"];
95
-  if($user_admin)
95
+  if ($user_admin)
96 96
   {
97
-    if ( $last_active < 60 )
97
+    if ($last_active < 60)
98 98
     {
99 99
       $tmp = "lime>{$lang['On']}";
100 100
     }
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
     }
106 106
     elseif ($last_active < 60 * 60 * 24)
107 107
     {
108
-      $last_active = round( $last_active / (60 * 60));
108
+      $last_active = round($last_active / (60 * 60));
109 109
       $tmp = "green>{$last_active} {$lang['sys_hrs_short']}";
110 110
     }
111 111
     else
112 112
     {
113
-      $last_active = round( $last_active / (60 * 60 * 24));
113
+      $last_active = round($last_active / (60 * 60 * 24));
114 114
       if ($last_active < 7)
115 115
       {
116 116
         $tmp = "yellow";
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
   }
129 129
   else
130 130
   {
131
-    if($user_onlinestatus)
131
+    if ($user_onlinestatus)
132 132
     {
133
-      if ( $last_active < 60 * 5 )
133
+      if ($last_active < 60 * 5)
134 134
       {
135 135
         $tmp = "lime>{$lang['On']}";
136 136
       }
Please login to merge, or discard this patch.
includes/alliance/ali_external_request.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  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
 {
5 5
   $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403);
6 6
 }
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     header('Location: alliance.php');
21 21
   }
22 22
 
23
-  if($user_request['request_denied'])
23
+  if ($user_request['request_denied'])
24 24
   {
25 25
     $lang['request_text'] = sprintf($lang['ali_req_deny_msg'], $ally['ally_tag'], $user_request['request_text']);
26 26
   }
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 
43 43
 $ally = doquery("SELECT * FROM {{alliance}} WHERE `id` ='{$id_ally}'", true);
44 44
 
45
-if(!$ally)
45
+if (!$ally)
46 46
 {
47 47
   message($lang['ali_sys_notFound'], $lang['ali_req_title']);
48 48
 }
49 49
 
50
-if($ally['ally_request_notallow'])
50
+if ($ally['ally_request_notallow'])
51 51
 {
52 52
   message($lang['ali_req_not_allowed'], $lang['ali_req_title']);
53 53
 }
Please login to merge, or discard this patch.
includes/alliance/ali_internal_admin_request.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  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
 
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
 }
10 10
 
11 11
 $d = sys_get_param_id('d');
12
-if($d) {
12
+if ($d) {
13 13
   doquery("UPDATE {{alliance_requests}} SET `request_denied` = 1, `request_text` = '{$lang['ali_req_deny_reason']}' WHERE `id_user`= {$d} LIMIT 1;");
14 14
 }
15 15
 
16 16
 $id_user = sys_get_param_id('id_user');
17
-if($id_user) {
17
+if ($id_user) {
18 18
   $ally_name_safe = db_escape($ally['ally_name']);
19 19
   $ally_tag_safe = db_escape($ally['ally_tag']);
20 20
   db_user_set_by_id($id_user, "`ally_id` = '{$ally['id']}', `ally_name` = '{$ally_name_safe}', `ally_tag` = '{$ally_tag_safe}', `ally_register_time` = " . SN_TIME_NOW . ", `ally_rank_id` = 0");
Please login to merge, or discard this patch.