Passed
Push — master ( d911ac...3cf5fb )
by Kevin
07:11 queued 10s
created
html/inc/language_names.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
     global $language_names;
64 64
     $supported_languages = get_supported_languages();
65 65
     $supported_languages[] = "en";
66
-    $sel = $cur_lang_name?"":"selected";
66
+    $sel = $cur_lang_name ? "" : "selected";
67 67
     echo "
68 68
         <option $sel value=auto>Language: default
69 69
     ";
70 70
     foreach ($language_names as $lang) {
71 71
         if (!in_array($lang[0], $supported_languages)) continue;
72
-        $sel = ($cur_lang_name == $lang[0])?"selected":"";
72
+        $sel = ($cur_lang_name == $lang[0]) ? "selected" : "";
73 73
         if ($lang[0] == "en") {
74 74
             echo "<option $sel value=".$lang[0].">".$lang[1];
75 75
         } else {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 // show a menu of supported languages
83 83
 //
84
-function language_form($cur_lang_name=null) {
84
+function language_form($cur_lang_name = null) {
85 85
     echo '
86 86
         <form name="language" method="get" action="set_language.php">
87 87
         <select class="selectbox form-control" name="lang" onchange="javascript: submit()">
Please login to merge, or discard this patch.
html/inc/bootstrap.inc 1 patch
Spacing   +15 added lines, -15 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;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 // output a panel.
215 215
 // $content_func is a function that generates the panel contents
216 216
 //
217
-function panel($title, $content_func, $class="panel-primary", $body_class="") {
217
+function panel($title, $content_func, $class = "panel-primary", $body_class = "") {
218 218
     echo sprintf('<div class="panel %s">
219 219
         ', $class
220 220
     );
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 // are functions that generate the top, left, and right content
241 241
 // $left_width is the width of left column in 1/12 units.
242 242
 //
243
-function grid($top_func, $left_func, $right_func, $left_width=6) {
243
+function grid($top_func, $left_func, $right_func, $left_width = 6) {
244 244
     echo '
245 245
         <div class="container-fluid">
246 246
     ';
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
             </div>
256 256
         ';
257 257
     }
258
-    $right_width = 12-$left_width;
258
+    $right_width = 12 - $left_width;
259 259
     echo '
260 260
         <div class="row">
261 261
         <div class="col-sm-'.$left_width.'">
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     ';
274 274
 }
275 275
 
276
-function form_start($action, $method='get') {
276
+function form_start($action, $method = 'get') {
277 277
     echo sprintf(
278 278
         '<div class="container">
279 279
         <form class="form-horizontal" method="%s" action="%s">'
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 define('FORM_LEFT_OFFSET', 'col-sm-offset-4');
298 298
 define('FORM_RIGHT_CLASS', 'col-sm-8');
299 299
 
300
-function form_input_text($label, $name, $value='', $type='text', $attrs='', $extra='') {
300
+function form_input_text($label, $name, $value = '', $type = 'text', $attrs = '', $extra = '') {
301 301
     echo sprintf('
302 302
         <div class="form-group">
303 303
             <label class="control-label %s">%s</label>
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     );
325 325
 }
326 326
 
327
-function form_input_textarea($label, $name, $value='') {
327
+function form_input_textarea($label, $name, $value = '') {
328 328
     echo sprintf('
329 329
         <div class="form-group">
330 330
             <label class="control-label %s" for="%s">%s</label>
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
     );
374 374
     $n = 0;
375 375
     foreach ($items as $i) {
376
-        $s = ($flags && $flags[$n])?'selected':'';
376
+        $s = ($flags && $flags[$n]) ? 'selected' : '';
377 377
         echo '<option '.$s.' value="'.$i[0].'">'.$i[1].'</option>
378 378
         ';
379 379
         $n++;
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 
384 384
 // $items is list of (name, label, checked)
385 385
 //
386
-function form_checkboxes($label, $items, $attrs='') {
386
+function form_checkboxes($label, $items, $attrs = '') {
387 387
     echo sprintf('
388 388
         <div class="form-group">
389 389
             <label class="control-label %s">%s</label>
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
         }
401 401
         echo sprintf('<input %s type="checkbox" name="%s" %s> %s
402 402
             ',
403
-            $attrs, $i[0], $i[2]?"checked":"", $i[1]
403
+            $attrs, $i[0], $i[2] ? "checked" : "", $i[1]
404 404
         );
405 405
     }
406 406
     echo '</div>
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         FORM_LEFT_CLASS, $label, FORM_RIGHT_CLASS
420 420
     );
421 421
     foreach ($items as $i) {
422
-        $checked = ($selected == $i[0])?"checked":"";
422
+        $checked = ($selected == $i[0]) ? "checked" : "";
423 423
         echo sprintf('<input type="radio" name="%s" value="%s" %s> %s <br>
424 424
             ',
425 425
             $name, $i[0], $checked, $i[1]
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 ';
453 453
 }
454 454
 
455
-function form_submit($text, $attrs='') {
455
+function form_submit($text, $attrs = '') {
456 456
     form_general(
457 457
         "",
458 458
         sprintf('<button %s type="submit" class="btn btn-success">%s</button>',
@@ -461,11 +461,11 @@  discard block
 block discarded – undo
461 461
     );
462 462
 }
463 463
 
464
-function form_checkbox($label, $name, $checked=false) {
464
+function form_checkbox($label, $name, $checked = false) {
465 465
     echo sprintf('
466 466
         <div class="form-group">
467 467
             <input type="checkbox" name="%s" %s> &nbsp; <span class="lead">%s</span>
468 468
         </div>
469
-        ', $name, $checked?"checked":"", $label
469
+        ', $name, $checked ? "checked" : "", $label
470 470
     );
471 471
 }
Please login to merge, or discard this patch.