Passed
Push — master ( 57e0bd...949aa5 )
by
unknown
16:34 queued 06:25
created
html/user/forum_post.php 2 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 $preview = post_str("preview", true);
57 57
 $warning = null;
58 58
 
59
-if ($content && $title && (!$preview)){
59
+if ($content && $title && (!$preview)) {
60 60
     if (post_str('add_signature', true)) {
61 61
         $add_signature = true;    // set a flag and concatenate later
62
-    }  else {
62
+    } else {
63 63
         $add_signature = false;
64 64
     }
65 65
     check_tokens($logged_in_user->authenticator);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>";
123 123
 }
124 124
 
125
-if ($force_title && $title){
125
+if ($force_title && $title) {
126 126
     row2(
127 127
         tra("Title"),
128 128
         sprintf(
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 $preview = post_str("preview", true);
57 57
 $warning = null;
58 58
 
59
-if ($content && $title && (!$preview)){
59
+if ($content && $title && (!$preview)) {
60 60
     if (post_str('add_signature', true)) {
61
-        $add_signature = true;    // set a flag and concatenate later
62
-    }  else {
61
+        $add_signature = true; // set a flag and concatenate later
62
+    } else {
63 63
         $add_signature = false;
64 64
     }
65 65
     check_tokens($logged_in_user->authenticator);
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
             if (post_str('subscribe', true)) {
75 75
                 BoincSubscription::replace($logged_in_user->id, $thread->id);
76 76
             }
77
-            header('Location: forum_thread.php?id=' . $thread->id);
77
+            header('Location: forum_thread.php?id='.$thread->id);
78 78
         } else {
79 79
             error_page("Can't create thread.  $forum_error");
80 80
         }
81 81
     }
82 82
 }
83 83
 
84
-page_head(tra("Create new thread"),'','','', $bbcode_js);
84
+page_head(tra("Create new thread"), '', '', '', $bbcode_js);
85 85
 show_forum_header($logged_in_user);
86 86
 
87 87
 if ($warning) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>";
123 123
 }
124 124
 
125
-if ($force_title && $title){
125
+if ($force_title && $title) {
126 126
     row2(
127 127
         tra("Title"),
128 128
         sprintf(
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     row2(
137 137
         tra("Title").$submit_help,
138 138
         sprintf('<input type="text" class="form-control" name="title" value="%s">',
139
-            $title?htmlspecialchars($title):''
139
+            $title ?htmlspecialchars($title) : ''
140 140
         ),
141 141
         null, FORUM_LH_PCT
142 142
     );
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     sprintf(
148 148
         '%s <textarea class="form-control" name="content" rows="12" cols="80">%s</textarea>',
149 149
         $bbcode_html,
150
-        $content?htmlspecialchars($content):''
150
+        $content ?htmlspecialchars($content) : ''
151 151
     ),
152 152
     null, FORUM_LH_PCT
153 153
 );
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 if (!$logged_in_user->prefs->no_signature_by_default) {
156 156
     $enable_signature = 'checked="true"';
157 157
 } else {
158
-    $enable_signature='';
158
+    $enable_signature = '';
159 159
 }
160 160
 
161 161
 if (is_news_forum($forum)) {
Please login to merge, or discard this patch.
html/ops/host_stats.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     if ($n === false) return '';
34 34
     $m = strpos($p, ']', $n);
35 35
     if ($m === false) return '';
36
-    $x = substr($p, $n+5, $m-$n-5);
36
+    $x = substr($p, $n + 5, $m - $n - 5);
37 37
 
38 38
     $n = strpos($x, ' ');
39 39
     if ($n !== false) return substr($x, 0, $n);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     if ($n === false) return '';
48 48
     $m = strpos($p, ']', $n);
49 49
     if ($m === false) return '';
50
-    $x = substr($p, $n+5, $m-$n-5);
50
+    $x = substr($p, $n + 5, $m - $n - 5);
51 51
     $n = strpos($x, '_');
52 52
     if ($n !== false) return substr($x, 0, $n);
53 53
     $n = strpos($x, 'r');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 function main() {
59 59
     global $max_days;
60
-    $t = time()-$max_days*86400;
60
+    $t = time() - $max_days*86400;
61 61
     $hosts = BoincHost::enum("rpc_time>$t");
62 62
     $descs = [];
63 63
     foreach ($hosts as $host) {
Please login to merge, or discard this patch.
html/inc/db_conn.inc 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
 // Intended to be subclassed (e.g., BoincDb, BossaDb)
23 23
 //
24 24
 class DbConn {
25
-    var $db_conn;       // a mysqli object
26
-    var $db_name;       // the DB name
25
+    var $db_conn; // a mysqli object
26
+    var $db_name; // the DB name
27 27
 
28 28
     function init_conn($user, $passwd, $host, $name) {
29 29
         $x = explode(":", $host);
30
-        if (sizeof($x)>1) {
30
+        if (sizeof($x) > 1) {
31 31
             $host = $x[0];
32 32
             $port = $x[1];
33 33
         } else {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         }
36 36
         try {
37 37
             $this->db_conn = @new mysqli($host, $user, $passwd, $name, $port);
38
-        } catch(Exception $e) {
38
+        } catch (Exception $e) {
39 39
             return false;
40 40
         }
41 41
         if (mysqli_connect_error()) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         return $this->enum_general($classname, $query);
137 137
     }
138 138
 
139
-    function enum($table, $classname, $where_clause=null, $order_clause=null) {
139
+    function enum($table, $classname, $where_clause = null, $order_clause = null) {
140 140
         return self::enum_fields(
141 141
             $table, $classname, '*', $where_clause, $order_clause
142 142
         );
@@ -181,15 +181,15 @@  discard block
 block discarded – undo
181 181
         if ($x) return (double)$x->$field;
182 182
         return false;
183 183
     }
184
-    function count($table, $clause="TRUE") {
184
+    function count($table, $clause = "TRUE") {
185 185
         $query = "select count(*) as total from DBNAME.$table where $clause";
186 186
         return $this->get_int($query, 'total');
187 187
     }
188
-    function sum($table, $field, $clause="") {
188
+    function sum($table, $field, $clause = "") {
189 189
         $query = "select sum($field) as total from DBNAME.$table $clause";
190 190
         return $this->get_double($query, 'total');
191 191
     }
192
-    function max($table, $field, $clause="") {
192
+    function max($table, $field, $clause = "") {
193 193
         $query = "select max($field) as total from DBNAME.$table $clause";
194 194
         return $this->get_double($query, 'total');
195 195
     }
Please login to merge, or discard this patch.
html/inc/util_basic.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
     return file_exists("$d/stop_sched");
57 57
 }
58 58
 
59
-function xml_error($num=-1, $msg=null, $file=null, $line=null) {
59
+function xml_error($num = -1, $msg = null, $file = null, $line = null) {
60 60
     global $xml_outer_tag;
61 61
     if (!$msg) {
62
-        switch($num) {
62
+        switch ($num) {
63 63
         case -112: $msg = "Invalid XML"; break;
64 64
         case -136: $msg = "Not found"; break;
65 65
         case -137: $msg = "Name or email address is not unique"; break;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 // If it's a single-tag element, and it's present, just return the tag
106 106
 //
107 107
 function parse_element($xml, $tag) {
108
-    $closetag = "</" . substr($tag,1);
108
+    $closetag = "</".substr($tag, 1);
109 109
     $x = strstr($xml, $tag);
110 110
     if ($x) {
111 111
         if (strstr($tag, "/>")) return $tag;
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 
122 122
 function parse_next_element($xml, $tag, &$cursor) {
123 123
     $element = null;
124
-    $closetag = "</" . substr($tag,1);
125
-    $pos = substr($xml,$cursor);
124
+    $closetag = "</".substr($tag, 1);
125
+    $pos = substr($xml, $cursor);
126 126
     $x = strstr($pos, $tag);
127 127
     if ($x) {
128 128
         if (strstr($tag, "/>")) return $tag;
Please login to merge, or discard this patch.
html/user/get_output2.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     if ($user->authenticator != $auth) die('bad auth');
52 52
 }
53 53
 
54
-function do_result_aux($result, $batch, $file_num=null) {
54
+function do_result_aux($result, $batch, $file_num = null) {
55 55
     $phys_names = get_outfile_phys_names($result);
56 56
     $log_names = get_outfile_log_names($result);
57 57
     if ($file_num !== null) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $dir_path = "submit/$batch->id/$result->name";
72 72
         system("rm -r $dir_path");
73 73
         mkdir($dir_path);
74
-        for ($i=0; $i<count($phys_names); $i++) {
74
+        for ($i = 0; $i < count($phys_names); $i++) {
75 75
             $cmd = sprintf('ln -s %s %s/%s',
76 76
                 upload_path($phys_names[$i]),
77 77
                 $dir_path,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     }
89 89
 }
90 90
 
91
-function do_result($result_id, $auth, $file_num=null) {
91
+function do_result($result_id, $auth, $file_num = null) {
92 92
     $result = BoincResult::lookup_id($result_id);
93 93
     if (!$result) die("no result $result_id");
94 94
     $workunit = BoincWorkunit::lookup_id($result->workunitid);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             system($cmd);
136 136
         } else {
137 137
             mkdir(sprintf('%s/%s', $dir_path, $result->name));
138
-            for ($i=0; $i<count($phys_names); $i++) {
138
+            for ($i = 0; $i < count($phys_names); $i++) {
139 139
                 $cmd = sprintf('ln -s %s %s/%s/%s',
140 140
                     upload_path($phys_names[$i]),
141 141
                     $dir_path,
Please login to merge, or discard this patch.
html/inc/submit_util.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 // get the total size of output files of a batch
301 301
 //
302 302
 function batch_output_file_size($batchid) {
303
-    $batch_td_size=0;
303
+    $batch_td_size = 0;
304 304
     $wus = BoincWorkunit::enum("batch=$batchid");
305 305
     $fanout = parse_config(get_config(), "<uldl_dir_fanout>");
306 306
     $upload_dir = parse_config(get_config(), "<upload_dir>");
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 }
331 331
 
332 332
 function boinc_get_wu_output_files_url($user, $wu_id) {
333
-    $auth_str =  md5($user->authenticator.$wu_id);
333
+    $auth_str = md5($user->authenticator.$wu_id);
334 334
     return "get_output.php?cmd=workunit_files&wu_id=$wu_id&auth_str=$auth_str";
335 335
 }
336 336
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
     if (!file_exists($path)) return null;
365 365
     $x = file_get_contents($path);
366 366
     $n = sscanf($x, "%s %d", $md5, $size);
367
-    if ($n != 2 || strlen($md5)!=32) {
367
+    if ($n != 2 || strlen($md5) != 32) {
368 368
         return null;
369 369
     }
370 370
     return [$md5, $size];
Please login to merge, or discard this patch.
html/inc/bootstrap.inc 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
         // prefix for links; needed for pages not in top dir
142 142
     $user,
143 143
         // logged-in user, if any
144
-    $fixed=false,
144
+    $fixed = false,
145 145
         // if true, navbar is fixed at top of page.
146 146
         // NOTE: if you do this, you must set a global var $fixed_navbar
147 147
         // to true at compile time
148 148
         // (it needs to be set when page_head() is called).
149
-    $inverse=false
149
+    $inverse = false
150 150
         // white on black?
151 151
 ) {
152 152
     global $master_url;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 // output a panel.
216 216
 // $content_func is a function that generates the panel contents
217 217
 //
218
-function panel($title, $content_func, $class="panel-primary", $body_class="") {
218
+function panel($title, $content_func, $class = "panel-primary", $body_class = "") {
219 219
     echo sprintf('<div class="panel %s">
220 220
         ', $class
221 221
     );
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 // $left_width is the width of left column in 1/12 units.
243 243
 // $arg is passed to the functions.
244 244
 //
245
-function grid($top_func, $left_func, $right_func, $left_width=6, $arg=null) {
245
+function grid($top_func, $left_func, $right_func, $left_width = 6, $arg = null) {
246 246
     echo '
247 247
         <div class="container-fluid">
248 248
     ';
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             </div>
258 258
         ';
259 259
     }
260
-    $right_width = 12-$left_width;
260
+    $right_width = 12 - $left_width;
261 261
     echo '
262 262
         <div class="row">
263 263
         <div class="col-sm-'.$left_width.'">
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 //      use extra = "name=x"
282 282
 //      call forum_focus(x, foo) after defining the field
283 283
 //
284
-function form_start($action, $method='get', $extra='') {
284
+function form_start($action, $method = 'get', $extra = '') {
285 285
     echo sprintf(
286 286
         '<div class="container-fluid">
287 287
         <form class="form-horizontal" method="%s" action="%s" %s>'
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 // just the input field
314 314
 //
315 315
 function form_input_text_field(
316
-    $name, $value='', $type='text', $attrs='', $extra=''
316
+    $name, $value = '', $type = 'text', $attrs = '', $extra = ''
317 317
 ) {
318 318
     return sprintf(
319 319
         '<input %s type="%s" class="form-control" name="%s" value="%s">%s',
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 // the whole row
325 325
 //
326 326
 function form_input_text(
327
-    $label, $name, $value='', $type='text', $attrs='', $extra=''
327
+    $label, $name, $value = '', $type = 'text', $attrs = '', $extra = ''
328 328
 ) {
329 329
     echo sprintf('
330 330
         <div class="form-group">
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     );
353 353
 }
354 354
 
355
-function form_input_textarea($label, $name, $value='', $nrows=4) {
355
+function form_input_textarea($label, $name, $value = '', $nrows = 4) {
356 356
     echo sprintf('
357 357
         <div class="form-group">
358 358
             <label align=right class="%s" for="%s">%s</label>
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
 // $items is either a string of <option> elements, or an array
370 370
 //
371
-function form_select($label, $name, $items, $selected=null) {
371
+function form_select($label, $name, $items, $selected = null) {
372 372
     echo sprintf('
373 373
         <div class="form-group">
374 374
             <label align=right class="%s" for="%s">%s</label>
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         foreach ($items as $i) {
382 382
             echo sprintf(
383 383
                 '<option %s value=%s>%s</option>',
384
-                ($i[0]==$selected)?'selected':'',
384
+                ($i[0] == $selected) ? 'selected' : '',
385 385
                 $i[0], $i[1]
386 386
             );
387 387
         }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 // same, for multiple select.
395 395
 // $selected, if non-null, is a list of selected values
396 396
 //
397
-function form_select_multiple($label, $name, $items, $selected=null) {
397
+function form_select_multiple($label, $name, $items, $selected = null) {
398 398
     echo sprintf('
399 399
         <div class="form-group">
400 400
             <label align=right class="%s" for="%s">%s</label>
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
     foreach ($items as $i) {
407 407
         echo sprintf(
408 408
             '<option %s value=%s>%s</option>',
409
-            ($selected && in_array($i[0], $selected))?'selected':'',
409
+            ($selected && in_array($i[0], $selected)) ? 'selected' : '',
410 410
             $i[0], $i[1]
411 411
         );
412 412
     }
@@ -415,12 +415,12 @@  discard block
 block discarded – undo
415 415
 
416 416
 // return a list of string for checkbox items
417 417
 //
418
-function checkbox_item_strings($items, $attrs='') {
418
+function checkbox_item_strings($items, $attrs = '') {
419 419
     $x = [];
420 420
     foreach ($items as $i) {
421 421
         $x[] = sprintf('<input %s type="checkbox" name="%s" %s> %s
422 422
             ',
423
-            $attrs, $i[0], $i[2]?"checked":"", $i[1]
423
+            $attrs, $i[0], $i[2] ? "checked" : "", $i[1]
424 424
         );
425 425
     }
426 426
     return $x;
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
 // $items is list of (name, label, checked)
430 430
 //
431
-function form_checkboxes($label, $items, $attrs='') {
431
+function form_checkboxes($label, $items, $attrs = '') {
432 432
     echo sprintf('
433 433
         <div class="form-group">
434 434
             <label align=right class="%s">%s</label>
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
         FORM_LEFT_CLASS, $label, FORM_RIGHT_CLASS
455 455
     );
456 456
     foreach ($items as $i) {
457
-        $checked = ($selected == $i[0])?"checked":"";
457
+        $checked = ($selected == $i[0]) ? "checked" : "";
458 458
         echo sprintf('<input type="radio" name="%s" value="%s" %s> %s <br>
459 459
             ',
460 460
             $name, $i[0], $checked, $i[1]
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 ';
488 488
 }
489 489
 
490
-function form_submit($text, $attrs='') {
490
+function form_submit($text, $attrs = '') {
491 491
     form_general(
492 492
         "",
493 493
         sprintf(
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
     );
498 498
 }
499 499
 
500
-function form_checkbox($label, $name, $checked=false) {
500
+function form_checkbox($label, $name, $checked = false) {
501 501
     echo sprintf('
502 502
         <div class="form-group">
503 503
             <label align=right class="%s">%s</label>
@@ -508,6 +508,6 @@  discard block
 block discarded – undo
508 508
     echo sprintf('
509 509
         <input type="checkbox" name="%s" %s>
510 510
         </div>
511
-        ', $name, $checked?"checked":""
511
+        ', $name, $checked ? "checked" : ""
512 512
     );
513 513
 }
Please login to merge, or discard this patch.
html/user/sandbox.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
     $fname = basename($url);
166 166
     $path = "$dir/$fname";
167 167
     if (file_exists($path)) {
168
-        error_page("File $fname exists; delete it first.");
168
+        error_page("file $fname exists; delete it first.");
169 169
     }
170 170
     copy($url, $path);
171 171
     $notice = "Fetched file from <strong>$url</strong><br/>";
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
     $notice = "";
170 170
     $dir = sandbox_dir($user);
171 171
     $count = count($_FILES['new_file']['tmp_name']);
172
-    for ($i=0; $i<$count; $i++) {
172
+    for ($i = 0; $i < $count; $i++) {
173 173
         $tmp_name = $_FILES['new_file']['tmp_name'][$i];
174 174
         if (!is_uploaded_file($tmp_name)) {
175 175
             error_page("$tmp_name is not uploaded file");
Please login to merge, or discard this patch.
html/user/buda.php 2 patches
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     if (!is_valid_filename($app)) die('bad arg');
93 93
     $variant = get_str('variant');
94 94
     if (!is_valid_filename($variant)) die('bad arg');
95
-    page_head("App $app variant $variant");
95
+    page_head("app $app variant $variant");
96 96
     $dir = "$buda_root/$app/$variant";
97 97
     start_table();
98 98
     table_header('name', 'size', 'md5');
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     form_input_hidden('app', $app);
137 137
     form_input_hidden('action', 'variant_action');
138 138
     form_input_text('Plan class', 'variant');
139
-    form_select("Dockerfile$sb", 'dockerfile', $sbitems);
139
+    form_select("dockerfile$sb", 'dockerfile', $sbitems);
140 140
     form_select_multiple("Application files$sb", 'app_files', $sbitems);
141 141
     form_input_text(
142 142
         'Input file names<br><small>Space-separated</small>',
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     // Note: we don't currently allow indirect file access.
223 223
     // If we did, we'd need to create job.toml to mount project dir
224 224
 
225
-    app_list("Variant $variant added for app $app.");
225
+    app_list("variant $variant added for app $app.");
226 226
 }
227 227
 
228 228
 function variant_delete() {
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         if ($ret) {
250 250
             error_page("delete failed");
251 251
         }
252
-        $notice = "Variant $variant of app $app removed.";
252
+        $notice = "variant $variant of app $app removed.";
253 253
         app_list($notice);
254 254
     } else {
255 255
         page_head("Confirm");
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         if ($ret) {
279 279
             error_page('delete failed');
280 280
         }
281
-        $notice = "App $app removed.";
281
+        $notice = "app $app removed.";
282 282
         app_list($notice);
283 283
     } else {
284 284
         page_head('Confirm');
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     if (!is_valid_filename($name)) die("bad arg: $name");
308 308
     $dir = "$buda_root/$name";
309 309
     if (file_exists($dir)) {
310
-        error_page("App $name already exists.");
310
+        error_page("app $name already exists.");
311 311
     }
312 312
     mkdir($dir);
313 313
     header("Location: buda.php");
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 // show list of BUDA apps and variants,
33 33
 // w/ buttons for adding and deleting
34 34
 //
35
-function app_list($notice=null) {
35
+function app_list($notice = null) {
36 36
     global $buda_root;
37 37
     if (!is_dir($buda_root)) {
38 38
         mkdir($buda_root);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     $dir = "$buda_root/$app/$variant";
97 97
     start_table();
98 98
     table_header('name', 'size', 'md5');
99
-    foreach(scandir($dir) as $f) {
99
+    foreach (scandir($dir) as $f) {
100 100
         if ($f[0] == '.') continue;
101 101
         [$md5, $size] = parse_info_file("$dir/.md5/$f");
102 102
         table_row(
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     //
173 173
     $x = "<input_template>\n";
174 174
     $ninfiles = 1 + count($variant_desc->input_file_names) + count($variant_desc->app_files);
175
-    for ($i=0; $i<$ninfiles; $i++) {
175
+    for ($i = 0; $i < $ninfiles; $i++) {
176 176
         $x .= "   <file_info>\n      <no_delete/>\n   </file_info>\n";
177 177
     }
178 178
     $x .= "   <workunit>\n";
Please login to merge, or discard this patch.