Passed
Push — work-fleets ( 6f822b...6dcfe4 )
by SuperNova.WS
06:31 queued 16s
created
time_probe.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 $time_server = $time_local  - $time_diff
14 14
 */
15 15
 
16
-if($font_size = sys_get_param_str('font_size')) {
17
-  if(strpos($font_size, '%') !== false) {
16
+if ($font_size = sys_get_param_str('font_size')) {
17
+  if (strpos($font_size, '%') !== false) {
18 18
     // Размер шрифта в процентах
19 19
     $font_size = min(max(floatval($font_size), FONT_SIZE_PERCENT_MIN), FONT_SIZE_PERCENT_MAX) . '%';
20
-  } elseif(strpos($font_size, 'px') !== false) {
20
+  } elseif (strpos($font_size, 'px') !== false) {
21 21
     // Размер шрифта в пикселях
22 22
     $font_size = min(max(floatval($font_size), FONT_SIZE_PIXELS_MIN), FONT_SIZE_PIXELS_MAX) . 'px';
23 23
   } else {
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
   classSupernova::$user_options[PLAYER_OPTION_BASE_FONT_SIZE] = $font_size;
30 30
 } else {
31 31
   $user_time_diff = playerTimeDiff::user_time_diff_get();
32
-  if($user_time_diff[PLAYER_OPTION_TIME_DIFF_FORCED]) {
32
+  if ($user_time_diff[PLAYER_OPTION_TIME_DIFF_FORCED]) {
33 33
     $time_diff = intval($user_time_diff[PLAYER_OPTION_TIME_DIFF]);
34 34
   } else {
35 35
     $user_time_diff = playerTimeDiff::user_time_diff_probe();
Please login to merge, or discard this patch.
docs/txt2html.php 2 patches
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -1,52 +1,52 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function dump($value,$varname = "",$level=0,$dumper = "")
3
+function dump($value, $varname = "", $level = 0, $dumper = "")
4 4
 {
5 5
   if ($varname) $varname .= " = ";
6 6
 
7
-  if ($level==-1)
7
+  if ($level == -1)
8 8
   {
9
-    $trans[' ']='&there4;';
10
-    $trans["\t"]='&rArr;';
11
-    $trans["\n"]='&para;;';
12
-    $trans["\r"]='&lArr;';
13
-    $trans["\0"]='&oplus;';
14
-    return strtr(htmlspecialchars($value),$trans);
9
+    $trans[' '] = '&there4;';
10
+    $trans["\t"] = '&rArr;';
11
+    $trans["\n"] = '&para;;';
12
+    $trans["\r"] = '&lArr;';
13
+    $trans["\0"] = '&oplus;';
14
+    return strtr(htmlspecialchars($value), $trans);
15 15
   }
16
-  if ($level==0) $dumper = '<pre>' . $varname;
16
+  if ($level == 0) $dumper = '<pre>' . $varname;
17 17
 
18 18
   $type = gettype($value);
19 19
   $dumper .= $type;
20 20
 
21
-  if ($type=='string')
21
+  if ($type == 'string')
22 22
   {
23
-    $dumper .= '('.strlen($value).')';
24
-    $value = dump($value,"",-1);
23
+    $dumper .= '(' . strlen($value) . ')';
24
+    $value = dump($value, "", -1);
25 25
   }
26
-  elseif ($type=='boolean') $value= ($value?'true':'false');
27
-  elseif ($type=='object')
26
+  elseif ($type == 'boolean') $value = ($value ? 'true' : 'false');
27
+  elseif ($type == 'object')
28 28
   {
29
-    $props= get_class_vars(get_class($value));
30
-    $dumper .= '('.count($props).') <u>'.get_class($value).'</u>';
31
-    foreach($props as $key=>$val)
29
+    $props = get_class_vars(get_class($value));
30
+    $dumper .= '(' . count($props) . ') <u>' . get_class($value) . '</u>';
31
+    foreach ($props as $key=>$val)
32 32
     {
33
-      $dumper .= "\n".str_repeat("\t",$level+1).$key.' => ';
34
-      $dumper .= dump($value->$key,"",$level+1);
33
+      $dumper .= "\n" . str_repeat("\t", $level + 1) . $key . ' => ';
34
+      $dumper .= dump($value->$key, "", $level + 1);
35 35
     }
36
-    $value= '';
36
+    $value = '';
37 37
   }
38
-  elseif ($type=='array')
38
+  elseif ($type == 'array')
39 39
   {
40
-    $dumper .= '('.count($value).')';
41
-    foreach($value as $key=>$val)
40
+    $dumper .= '(' . count($value) . ')';
41
+    foreach ($value as $key=>$val)
42 42
     {
43
-      $dumper .= "\n".str_repeat("\t",$level+1).dump($key,"",-1).' => ';
44
-      $dumper .= dump($val,"",$level+1);
43
+      $dumper .= "\n" . str_repeat("\t", $level + 1) . dump($key, "", -1) . ' => ';
44
+      $dumper .= dump($val, "", $level + 1);
45 45
     }
46
-    $value= '';
46
+    $value = '';
47 47
   }
48 48
   $dumper .= " <b>$value</b>";
49
-  if ($level==0) $dumper .= '</pre>';
49
+  if ($level == 0) $dumper .= '</pre>';
50 50
   return $dumper;
51 51
 }
52 52
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
   $output_buffer .= $string;
68 68
 }
69 69
 
70
-if(substr(getcwd(), -4) != 'docs')
70
+if (substr(getcwd(), -4) != 'docs')
71 71
 {
72 72
   $path_prefix = 'docs/';
73 73
 }
@@ -80,22 +80,22 @@  discard block
 block discarded – undo
80 80
 
81 81
 $filename = 'changelog';
82 82
 
83
-$input =  file_get_contents($path_prefix . $filename . '.txt');
83
+$input = file_get_contents($path_prefix . $filename . '.txt');
84 84
 //$input = iconv('CP1251', 'UTF-8', $input);
85 85
 
86 86
 $input = preg_replace("/\r\n\d\d\d\d\-\d\d\-\d\d\ \d\d\:\d\d/", "[D] $0", $input);
87 87
 
88
-while(strpos($input, "\r\n\r\n") !== false)
88
+while (strpos($input, "\r\n\r\n") !== false)
89 89
 {
90 90
   $input = str_replace("\r\n\r\n", "\r\n", $input);
91 91
 }
92
-while(strpos($input, "~~~") !== false)
92
+while (strpos($input, "~~~") !== false)
93 93
 {
94 94
   $input = str_replace("~~~", "~~", $input);
95 95
 }
96 96
 $input = str_replace("\r\n~~", "~~", $input);
97 97
 
98
-while(strpos($input, "===") !== false)
98
+while (strpos($input, "===") !== false)
99 99
 {
100 100
   $input = str_replace("===", "==", $input);
101 101
 }
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 $prev_chapter_is_header = false;
107 107
 $output = array();
108 108
 $buffer = array();
109
-foreach($input as &$chapter)
109
+foreach ($input as &$chapter)
110 110
 {
111 111
   $chapter = preg_split("/(\r\n[\[])/", $chapter, -1, PREG_SPLIT_NO_EMPTY); // , PREG_SPLIT_DELIM_CAPTURE
112 112
 
113
-  if(count($chapter) == 1 && !$prev_chapter_is_header)
113
+  if (count($chapter) == 1 && !$prev_chapter_is_header)
114 114
   {
115
-    if(!empty($chapter))
115
+    if (!empty($chapter))
116 116
     {
117 117
       $output[] = $buffer;
118 118
       $buffer = array();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
   else
124 124
   {
125 125
     $prev_chapter_is_header = false;
126
-    foreach($chapter as &$note)
126
+    foreach ($chapter as &$note)
127 127
     {
128 128
       $note = explode("\r\n", $note);
129 129
       $new_note = true;
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
 
132 132
       $note_out = array();
133 133
 
134
-      foreach($note as &$line)
134
+      foreach ($note as &$line)
135 135
       {
136
-        if(!$line)
136
+        if (!$line)
137 137
         {
138 138
           continue;
139 139
         }
140
-        if($new_note)
140
+        if ($new_note)
141 141
         {
142 142
           // 78 - 3 = 75
143 143
           $note_out['style'] = $line[0];
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
         }
146 146
 
147 147
         $buf_str .= $line;
148
-        if(mb_strlen($line, 'utf-8') < ($new_note ? 75 : 79))
148
+        if (mb_strlen($line, 'utf-8') < ($new_note ? 75 : 79))
149 149
         {
150
-          if(!isset($note_out['name']))
150
+          if (!isset($note_out['name']))
151 151
           {
152 152
             $note_out['name'] = $buf_str;
153 153
           }
@@ -201,31 +201,31 @@  discard block
 block discarded – undo
201 201
   'D' => 'date',
202 202
 );
203 203
 
204
-foreach($output as $chapter)
204
+foreach ($output as $chapter)
205 205
 {
206
-  if(!$chapter)
206
+  if (!$chapter)
207 207
   {
208 208
     continue;
209 209
   }
210 210
 
211 211
   buf_print("<h1>{$chapter['name']}</h1>\r\n");
212
-  foreach($chapter['content'] as $block)
212
+  foreach ($chapter['content'] as $block)
213 213
   {
214 214
     buf_print("<div class=\"{$styles[$block['style']]}\">" . ($block['style'] != 'D' ? "[{$block['style']}]&nbsp;" : ''));
215 215
     buf_print(preg_replace("/\s{2,10}/", " ", $block['name']) . '<br />');
216
-    if(isset($block['lines']))
216
+    if (isset($block['lines']))
217 217
     {
218 218
       $last_spaces = '';
219 219
       $depth = array();
220
-      foreach($block['lines'] as $line)
220
+      foreach ($block['lines'] as $line)
221 221
       {
222
-        if(preg_match("/^(\s+)(\d*|\s)\.*\s*(.*)/", $line, $matches))
222
+        if (preg_match("/^(\s+)(\d*|\s)\.*\s*(.*)/", $line, $matches))
223 223
         {
224 224
           //$line = strlen($matches[1]) . '/' . $matches[2] . '/' . $matches[3];
225 225
           $line = $matches[3];
226
-          if(strlen($matches[1]) > strlen($last_spaces))
226
+          if (strlen($matches[1]) > strlen($last_spaces))
227 227
           {
228
-            if($matches[2])
228
+            if ($matches[2])
229 229
             {
230 230
               buf_print("<ol>\r\n");
231 231
             }
@@ -237,9 +237,9 @@  discard block
 block discarded – undo
237 237
             $last_spaces = $matches[1];
238 238
             $depth[] = $matches[2];
239 239
           }
240
-          elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth))
240
+          elseif (strlen($matches[1]) < strlen($last_spaces) && count($depth))
241 241
           {
242
-            if(array_pop($depth))
242
+            if (array_pop($depth))
243 243
             {
244 244
               buf_print("</ol>\r\n");
245 245
             }
@@ -250,14 +250,14 @@  discard block
 block discarded – undo
250 250
             $last_spaces = $matches[1];
251 251
             buf_print('<li>');
252 252
           }
253
-          elseif(strlen($last_spaces) == strlen($matches[1]))
253
+          elseif (strlen($last_spaces) == strlen($matches[1]))
254 254
           {
255
-            if($matches[2] == '' && $depth[count($depth) - 1] != '')
255
+            if ($matches[2] == '' && $depth[count($depth) - 1] != '')
256 256
             {
257 257
               buf_print("</ol>\r\n");
258 258
               buf_print("<ul>\r\n");
259 259
             }
260
-            elseif($matches[2] != '' && $depth[count($depth) - 1] == '')
260
+            elseif ($matches[2] != '' && $depth[count($depth) - 1] == '')
261 261
             {
262 262
               buf_print("</ul>\r\n");
263 263
               buf_print("<ol>\r\n");
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
         $line = preg_replace("/\s{2,10}/", " ", $line);
270 270
         buf_print($line . "<br />\r\n");
271 271
       }
272
-      while(count($depth))
272
+      while (count($depth))
273 273
       {
274
-        if(array_pop($depth))
274
+        if (array_pop($depth))
275 275
         {
276 276
           buf_print("</ol>\r\n");
277 277
         }
@@ -287,10 +287,10 @@  discard block
 block discarded – undo
287 287
 buf_print("</body>\r\n</html>\r\n");
288 288
 
289 289
 $html = file_get_contents($path_prefix . 'html/' . $filename . '.html');
290
-if($html != $output_buffer)
290
+if ($html != $output_buffer)
291 291
 {
292 292
   file_put_contents($path_prefix . 'html/' . $filename . '.html', $output_buffer);
293
-  if(!$path_prefix)
293
+  if (!$path_prefix)
294 294
   {
295 295
     print($output_buffer);
296 296
   }
Please login to merge, or discard this patch.
Braces   +26 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,8 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function dump($value,$varname = "",$level=0,$dumper = "")
4
-{
5
-  if ($varname) $varname .= " = ";
3
+function dump($value,$varname = "",$level=0,$dumper = "") {
4
+  if ($varname) {
5
+    $varname .= " = ";
6
+  }
6 7
 
7 8
   if ($level==-1)
8 9
   {
@@ -13,7 +14,9 @@  discard block
 block discarded – undo
13 14
     $trans["\0"]='&oplus;';
14 15
     return strtr(htmlspecialchars($value),$trans);
15 16
   }
16
-  if ($level==0) $dumper = '<pre>' . $varname;
17
+  if ($level==0) {
18
+    $dumper = '<pre>' . $varname;
19
+  }
17 20
 
18 21
   $type = gettype($value);
19 22
   $dumper .= $type;
@@ -22,9 +25,9 @@  discard block
 block discarded – undo
22 25
   {
23 26
     $dumper .= '('.strlen($value).')';
24 27
     $value = dump($value,"",-1);
25
-  }
26
-  elseif ($type=='boolean') $value= ($value?'true':'false');
27
-  elseif ($type=='object')
28
+  } elseif ($type=='boolean') {
29
+    $value= ($value?'true':'false');
30
+  } elseif ($type=='object')
28 31
   {
29 32
     $props= get_class_vars(get_class($value));
30 33
     $dumper .= '('.count($props).') <u>'.get_class($value).'</u>';
@@ -34,8 +37,7 @@  discard block
 block discarded – undo
34 37
       $dumper .= dump($value->$key,"",$level+1);
35 38
     }
36 39
     $value= '';
37
-  }
38
-  elseif ($type=='array')
40
+  } elseif ($type=='array')
39 41
   {
40 42
     $dumper .= '('.count($value).')';
41 43
     foreach($value as $key=>$val)
@@ -46,22 +48,21 @@  discard block
 block discarded – undo
46 48
     $value= '';
47 49
   }
48 50
   $dumper .= " <b>$value</b>";
49
-  if ($level==0) $dumper .= '</pre>';
51
+  if ($level==0) {
52
+    $dumper .= '</pre>';
53
+  }
50 54
   return $dumper;
51 55
 }
52 56
 
53
-function pdump($value, $varname = '')
54
-{
57
+function pdump($value, $varname = '') {
55 58
   print('<span style="text-align: left">' . dump($value, $varname) . '</span>');
56 59
 }
57 60
 
58
-function debug($value, $varname = '')
59
-{
61
+function debug($value, $varname = '') {
60 62
   return pdump($value, $varname);
61 63
 }
62 64
 
63
-function buf_print($string)
64
-{
65
+function buf_print($string) {
65 66
   global $output_buffer;
66 67
 
67 68
   $output_buffer .= $string;
@@ -70,8 +71,7 @@  discard block
 block discarded – undo
70 71
 if(substr(getcwd(), -4) != 'docs')
71 72
 {
72 73
   $path_prefix = 'docs/';
73
-}
74
-else
74
+} else
75 75
 {
76 76
   $path_prefix = '';
77 77
 }
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
       $buffer['name'] = $chapter[0];
120 120
     }
121 121
     $prev_chapter_is_header = true;
122
-  }
123
-  else
122
+  } else
124 123
   {
125 124
     $prev_chapter_is_header = false;
126 125
     foreach($chapter as &$note)
@@ -150,8 +149,7 @@  discard block
 block discarded – undo
150 149
           if(!isset($note_out['name']))
151 150
           {
152 151
             $note_out['name'] = $buf_str;
153
-          }
154
-          else
152
+          } else
155 153
           {
156 154
             $note_out['lines'][] = $buf_str;
157 155
           }
@@ -228,36 +226,31 @@  discard block
 block discarded – undo
228 226
             if($matches[2])
229 227
             {
230 228
               buf_print("<ol>\r\n");
231
-            }
232
-            else
229
+            } else
233 230
             {
234 231
               buf_print("<ul>\r\n");
235 232
             }
236 233
             buf_print('<li>');
237 234
             $last_spaces = $matches[1];
238 235
             $depth[] = $matches[2];
239
-          }
240
-          elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth))
236
+          } elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth))
241 237
           {
242 238
             if(array_pop($depth))
243 239
             {
244 240
               buf_print("</ol>\r\n");
245
-            }
246
-            else
241
+            } else
247 242
             {
248 243
               buf_print("</ul>\r\n");
249 244
             }
250 245
             $last_spaces = $matches[1];
251 246
             buf_print('<li>');
252
-          }
253
-          elseif(strlen($last_spaces) == strlen($matches[1]))
247
+          } elseif(strlen($last_spaces) == strlen($matches[1]))
254 248
           {
255 249
             if($matches[2] == '' && $depth[count($depth) - 1] != '')
256 250
             {
257 251
               buf_print("</ol>\r\n");
258 252
               buf_print("<ul>\r\n");
259
-            }
260
-            elseif($matches[2] != '' && $depth[count($depth) - 1] == '')
253
+            } elseif($matches[2] != '' && $depth[count($depth) - 1] == '')
261 254
             {
262 255
               buf_print("</ul>\r\n");
263 256
               buf_print("<ol>\r\n");
@@ -274,8 +267,7 @@  discard block
 block discarded – undo
274 267
         if(array_pop($depth))
275 268
         {
276 269
           buf_print("</ol>\r\n");
277
-        }
278
-        else
270
+        } else
279 271
         {
280 272
           buf_print("</ul>\r\n");
281 273
         }
Please login to merge, or discard this patch.
language/en/system.mo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -951,7 +951,7 @@
 block discarded – undo
951 951
     REGISTER_ERROR_USERNAME_WRONG => 'Wrong player name',
952 952
     REGISTER_ERROR_ACCOUNT_NAME_EXISTS => 'Account name already registered',
953 953
     REGISTER_ERROR_PASSWORD_INSECURE => 'Insecure or wrong password. Password should be at least ' . PASSWORD_LENGTH_MIN . ' characters long and cannot start or end with spaces',
954
-    REGISTER_ERROR_USERNAME_SHORT => 'Слишком короткое имя. Имя должно состоять минимум из ' . LOGIN_LENGTH_MIN. ' символов',
954
+    REGISTER_ERROR_USERNAME_SHORT => 'Слишком короткое имя. Имя должно состоять минимум из ' . LOGIN_LENGTH_MIN . ' символов',
955 955
     REGISTER_ERROR_PASSWORD_DIFFERENT => 'Password does not match confirmation password',
956 956
     REGISTER_ERROR_EMAIL_EMPTY => 'Е-Мейл не может быть пустым',
957 957
     REGISTER_ERROR_EMAIL_WRONG => 'Введенный Е-Мейл не является адресом электронной почты',
Please login to merge, or discard this patch.
dark_matter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 include_once('common.' . substr(strrchr(__FILE__, '.'), 1));
4 4
 
5
-if(sn_module_get_active_count('payment') && !defined('SN_GOOGLE')) {
5
+if (sn_module_get_active_count('payment') && !defined('SN_GOOGLE')) {
6 6
   sys_redirect('metamatter.php');
7 7
 }
8 8
 
Please login to merge, or discard this patch.
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.
includes/includes/uni_rename.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
       sn_db_transaction_commit();
47 47
       sys_redirect("galaxy.php?mode=name&galaxy={$uni_galaxy}&system={$uni_system}");
48 48
     }
49
-  }
50
-  catch (exception $e)
49
+  } catch (exception $e)
51 50
   {
52 51
     sn_db_transaction_rollback();
53 52
     $template->assign_block_vars('result', array(
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
     $uni_galaxy = sys_get_param_int('galaxy', $planetrow['galaxy']);
14 14
     $uni_system = sys_get_param_int('system');
15 15
 
16
-    if($uni_galaxy < 1 || $uni_galaxy > Vector::$knownGalaxies)
16
+    if ($uni_galaxy < 1 || $uni_galaxy > Vector::$knownGalaxies)
17 17
     {
18 18
       throw new exception(classLocale::$lang['uni_msg_error_wrong_galaxy'], ERR_ERROR);
19 19
     }
20 20
 
21
-    if($uni_system < 0 || $uni_system > Vector::$knownSystems)
21
+    if ($uni_system < 0 || $uni_system > Vector::$knownSystems)
22 22
     {
23 23
       throw new exception(classLocale::$lang['uni_msg_error_wrong_system'], ERR_ERROR);
24 24
     }
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
     $uni_row['universe_price'] += $uni_system ? classSupernova::$config->uni_price_system : classSupernova::$config->uni_price_galaxy;
28 28
     $uni_row['universe_name'] = strip_tags($uni_row['universe_name'] ? $uni_row['universe_name'] : ($uni_system ? "{$classLocale['sys_system']} [{$uni_galaxy}:{$uni_system}]" : "{$classLocale['sys_galaxy']} {$uni_galaxy}"));
29 29
 
30
-    if(sys_get_param_str('uni_name_submit'))
30
+    if (sys_get_param_str('uni_name_submit'))
31 31
     {
32 32
       $uni_row['universe_name'] = strip_tags(sys_get_param_str('uni_name'));
33 33
 
34 34
       $uni_price = sys_get_param_float('uni_price');
35
-      if($uni_price < $uni_row['universe_price'])
35
+      if ($uni_price < $uni_row['universe_price'])
36 36
       {
37 37
         throw new exception(classLocale::$lang['uni_msg_error_low_price'], ERR_ERROR);
38 38
       }
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
       sn_db_transaction_start();
42 42
       $user = DBStaticUser::db_user_by_id($user['id'], true);
43 43
       // if($user[get_unit_param(RES_DARK_MATTER, P_NAME)] < $uni_price)
44
-      if(mrc_get_level($user, null, RES_DARK_MATTER) < $uni_price)
44
+      if (mrc_get_level($user, null, RES_DARK_MATTER) < $uni_price)
45 45
       {
46 46
         throw new exception(classLocale::$lang['uni_msg_error_no_dm'], ERR_ERROR);
47 47
       }
48 48
 
49
-      if(!rpg_points_change($user['id'], RPG_RENAME, -$uni_price, "Renaming [{$uni_galaxy}:{$uni_system}] to " . sys_get_param_str_unsafe('uni_name')))
49
+      if (!rpg_points_change($user['id'], RPG_RENAME, -$uni_price, "Renaming [{$uni_galaxy}:{$uni_system}] to " . sys_get_param_str_unsafe('uni_name')))
50 50
       {
51 51
         throw new exception(classLocale::$lang['sys_msg_err_update_dm'], ERR_ERROR);
52 52
       }
Please login to merge, or discard this patch.
includes/includes/market_info.inc 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
 
80 80
     sn_db_transaction_commit();
81 81
     throw new Exception($info_action, ERR_NONE);
82
-  }
83
-  catch (Exception $e)
82
+  } catch (Exception $e)
84 83
   {
85 84
     sn_db_transaction_rollback();
86 85
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 $classLocale = classLocale::$lang;
7 7
 
8
-if(!defined('SN_IN_MARKET') || SN_IN_MARKET !== true)
8
+if (!defined('SN_IN_MARKET') || SN_IN_MARKET !== true)
9 9
 {
10 10
   classSupernova::$debug->error("Attempt to call market page mode {$mode} directly - not from market.php", 'Forbidden', 403);
11 11
 }
@@ -20,50 +20,50 @@  discard block
 block discarded – undo
20 20
 ));
21 21
 
22 22
 $info_action = sys_get_param_int('action');
23
-if($info_action)
23
+if ($info_action)
24 24
 {
25 25
   try
26 26
   {
27 27
     sn_db_transaction_start();
28 28
 
29 29
     $user = DBStaticUser::db_user_by_id($user['id'], true);
30
-    if(mrc_get_level($user, null, RES_DARK_MATTER) < classSupernova::$config->rpg_cost_info)
30
+    if (mrc_get_level($user, null, RES_DARK_MATTER) < classSupernova::$config->rpg_cost_info)
31 31
     {
32 32
       throw new Exception(MARKET_NO_DM, ERR_ERROR);
33 33
     }
34 34
 
35
-    switch($info_action)
35
+    switch ($info_action)
36 36
     {
37 37
       case MARKET_INFO_PLAYER:
38 38
         $user_info_name_unsafe = sys_get_param_str_unsafe('user_info_name');
39
-        if(!$user_info_name_unsafe)
39
+        if (!$user_info_name_unsafe)
40 40
         {
41 41
           throw new Exception(MARKET_INFO_PLAYER_WRONG, ERR_ERROR);
42 42
         }
43 43
 
44
-        if(is_id($user_info_name_unsafe))
44
+        if (is_id($user_info_name_unsafe))
45 45
         {
46 46
           $user_info = DBStaticUser::db_user_by_id($user_info_name_unsafe, true, '`id`, `username`', true);
47 47
         }
48
-        if(!is_array($user_info))
48
+        if (!is_array($user_info))
49 49
         {
50 50
           $user_info = DBStaticUser::db_user_by_username($user_info_name_unsafe, true, '`id`, `username`', true, true);
51 51
         }
52
-        if(!is_array($user_info))
52
+        if (!is_array($user_info))
53 53
         {
54 54
           throw new Exception(MARKET_INFO_PLAYER_NOT_FOUND, ERR_ERROR);
55 55
         }
56
-        if($user_info['id'] == $user['id'])
56
+        if ($user_info['id'] == $user['id'])
57 57
         {
58 58
           throw new Exception(MARKET_INFO_PLAYER_SAME, ERR_ERROR);
59 59
         }
60 60
 
61 61
         $msg_text = array();
62
-        foreach(sn_get_groups('mercenaries') as $mercenary_id)
62
+        foreach (sn_get_groups('mercenaries') as $mercenary_id)
63 63
         {
64 64
           $msg_text[] = "{$classLocale['tech'][$mercenary_id]} - " . (($mercenary_level = mrc_get_level($user_info, null, $mercenary_id)) ? "{$classLocale['sys_level']} {$mercenary_level}" : classLocale::$lang['eco_mrk_info_not_hired']);
65 65
         }
66
-        if($mercenary_level = mrc_get_level($user_info, null, UNIT_PREMIUM))
66
+        if ($mercenary_level = mrc_get_level($user_info, null, UNIT_PREMIUM))
67 67
         {
68 68
           $msg_text[] = "{$classLocale['tech'][UNIT_PREMIUM]} - {$mercenary_level} {$classLocale['sys_level']}";
69 69
         }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
       break;
78 78
     }
79 79
 
80
-    if(!rpg_points_change($user['id'], RPG_MARKET_INFO_MERCENARY, -classSupernova::$config->rpg_cost_info, "Using Black Market page {$classLocale['eco_mrk_info']} - getting info about user ID {$user_info['id']}"))
80
+    if (!rpg_points_change($user['id'], RPG_MARKET_INFO_MERCENARY, -classSupernova::$config->rpg_cost_info, "Using Black Market page {$classLocale['eco_mrk_info']} - getting info about user ID {$user_info['id']}"))
81 81
     {
82 82
       // TODO: throw new Exception(MARKET_INFO_PLAYER_SAME, ERR_ERROR);
83 83
     }
Please login to merge, or discard this patch.
captcha.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,16 +2,16 @@
 block discarded – undo
2 2
 // Captcha code for registration - really didn't work alot :(
3 3
 
4 4
 session_start();
5
-$en=100;
6
-$boy=25;
7
-$sayi = mt_rand(0,9999999);
5
+$en = 100;
6
+$boy = 25;
7
+$sayi = mt_rand(0, 9999999);
8 8
 $_SESSION['captcha'] = $sayi;
9
-$tuval = imagecreatetruecolor($en,$boy);
10
-$b = imagecolorallocate($tuval,175,238,238);
11
-$s = imagecolorallocate($tuval,0,0,0);
12
-imagefill($tuval,0,0,$s);
13
-imageline($tuval,20,50,$en,$boy,$b);
14
-imagestring($tuval,3,27,7,$sayi,$b);
9
+$tuval = imagecreatetruecolor($en, $boy);
10
+$b = imagecolorallocate($tuval, 175, 238, 238);
11
+$s = imagecolorallocate($tuval, 0, 0, 0);
12
+imagefill($tuval, 0, 0, $s);
13
+imageline($tuval, 20, 50, $en, $boy, $b);
14
+imagestring($tuval, 3, 27, 7, $sayi, $b);
15 15
 Header("content-type:image/gif");
16 16
 imagegif($tuval);
17 17
 imagedestroy($tuval);
Please login to merge, or discard this patch.
quest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-define('INSIDE'  , true);
11
-define('INSTALL' , false);
10
+define('INSIDE', true);
11
+define('INSTALL', false);
12 12
 
13 13
 require('common.' . substr(strrchr(__FILE__, '.'), 1));
14 14
 
Please login to merge, or discard this patch.