Passed
Push — master ( f28c5c...f5359d )
by Kevin
01:04 queued 24s
created
html/inc/bossa.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
 function bossa_batch_create($appid, $name, $calibration) {
42 42
     $now = time();
43
-    $c = $calibration?"1":"0";
43
+    $c = $calibration ? "1" : "0";
44 44
     return BossaBatch::insert("(create_time, app_id, name, calibration) values ($now, $appid, '$name', $c)");
45 45
 }
46 46
 
Please login to merge, or discard this patch.
html/inc/countries.inc 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     "Zimbabwe"
258 258
 );
259 259
 
260
-$country_to_iso3166_2 = array (
260
+$country_to_iso3166_2 = array(
261 261
     "Afghanistan" => "af",
262 262
     "Albania" => "al",
263 263
     "Algeria" => "dz",
@@ -493,25 +493,25 @@  discard block
 block discarded – undo
493 493
 
494 494
 // return a list of country options for a <select>
495 495
 //
496
-function country_select_options($selected_country="None") {
496
+function country_select_options($selected_country = "None") {
497 497
     global $countries;
498 498
 
499 499
     require_once("../inc/geoip.inc"); 
500 500
 
501 501
     // See if we can find the user's country and select it as default:
502 502
     //
503
-    $gi = geoip_open("../inc/GeoIP.dat",GEOIP_STANDARD);
504
-    $geoip_country = geoip_country_name_by_addr($gi,$_SERVER["REMOTE_ADDR"]);
503
+    $gi = geoip_open("../inc/GeoIP.dat", GEOIP_STANDARD);
504
+    $geoip_country = geoip_country_name_by_addr($gi, $_SERVER["REMOTE_ADDR"]);
505 505
     geoip_close($gi);
506 506
 
507
-    if ($selected_country=="") $selected_country="None";
508
-    if ($selected_country=="None" and $geoip_country!=""){
509
-        $selected_country=$geoip_country;
507
+    if ($selected_country == "") $selected_country = "None";
508
+    if ($selected_country == "None" and $geoip_country != "") {
509
+        $selected_country = $geoip_country;
510 510
     }
511 511
 
512 512
     $x = "";
513 513
     foreach ($countries as $country) {
514
-        $selected = ($selected_country == $country ? "selected":"");
514
+        $selected = ($selected_country == $country ? "selected" : "");
515 515
         $x .= "<option value=\"$country\" $selected>$country</option>\n";
516 516
     }
517 517
     return $x;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -505,7 +505,7 @@
 block discarded – undo
505 505
     geoip_close($gi);
506 506
 
507 507
     if ($selected_country=="") $selected_country="None";
508
-    if ($selected_country=="None" and $geoip_country!=""){
508
+    if ($selected_country=="None" and $geoip_country!="") {
509 509
         $selected_country=$geoip_country;
510 510
     }
511 511
 
Please login to merge, or discard this patch.
html/inc/cert.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
     credit_to_ops($credit, $ops, $unit);
44 44
       
45 45
     if ($bolden) {
46
-        $lbold="[[";
47
-        $rbold="]]";
46
+        $lbold = "[[";
47
+        $rbold = "]]";
48 48
     } else {
49
-        $lbold="";        $rbold="";
49
+        $lbold = ""; $rbold = "";
50 50
     } 
51 51
     return " $lbold$cobbs Cobblestones$rbold of computation ($ops $unit floating-point operations)";
52 52
 }
Please login to merge, or discard this patch.
html/inc/text_transform.inc 3 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 require_once('../inc/sanitize_html.inc');
27 27
 
28 28
 class output_options {
29
-    var $bb2html;            // BBCode as HTML? (on)
30
-    var $images_as_links;    // Images as hyperlinks? (off)
31
-    var $link_popup;        // Links in new windows? (off)
32
-    var $nl2br;                // Convert newlines to <br>'s? (on)
33
-    var $htmlitems;            // Convert special chars to HTML entities? (on)
34
-    var $htmlscrub;            // Scrub "bad" HTML tags? (off)
35
-    var $highlight_terms;// Array of terms to be highlighted (off)    
29
+    var $bb2html; // BBCode as HTML? (on)
30
+    var $images_as_links; // Images as hyperlinks? (off)
31
+    var $link_popup; // Links in new windows? (off)
32
+    var $nl2br; // Convert newlines to <br>'s? (on)
33
+    var $htmlitems; // Convert special chars to HTML entities? (on)
34
+    var $htmlscrub; // Scrub "bad" HTML tags? (off)
35
+    var $highlight_terms; // Array of terms to be highlighted (off)    
36 36
 
37 37
     // Constructor - set the defaults.
38 38
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     if ($export) {
110 110
         $text = preg_replace_callback(
111 111
             "@\[pre\](.*?)\[/pre\]@is",
112
-            function ($matches) {
112
+            function($matches) {
113 113
                 $x = remove_br(substr($matches[0], 5, -6));
114 114
                 $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false);
115 115
                 $x = str_replace("[", "&#91;", $x);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         );
120 120
         return preg_replace_callback(
121 121
             "@\[code\](.*?)\[/code\]@is",
122
-            function ($matches) {
122
+            function($matches) {
123 123
                 $x = remove_br(substr($matches[0], 6, -7));
124 124
                 $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false);
125 125
                 $x = str_replace("[", "&#91;", $x);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     } else {
131 131
         $text = preg_replace_callback(
132 132
             "@\[pre\](.*?)\[/pre\]@is",
133
-            function ($matches) {
133
+            function($matches) {
134 134
                 $x = remove_br(substr($matches[0], 5, -6));
135 135
                 $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false);
136 136
                 $x = str_replace("[", "&#91;", $x);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         );
141 141
         return preg_replace_callback(
142 142
             "@\[code\](.*?)\[/code\]@is",
143
-            function ($matches) {
143
+            function($matches) {
144 144
                 $x = remove_br(substr($matches[0], 6, -7));
145 145
                 $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false);
146 146
                 $x = str_replace("[", "&#91;", $x);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     }
152 152
 }
153 153
 
154
-function bb2html($text, $export=false) {
154
+function bb2html($text, $export = false) {
155 155
     $urlregex = "(?:\"?)(?:(http\:\/\/)?)([^\[\"<\ ]+)(?:\"?)";
156 156
     // NOTE:
157 157
     // This matches https:// too; I don't understand why.
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
     $httpsregex = "(?:\"?)https\:\/\/([^\[\"<\ ]+)(?:\"?)";
173 173
     // List of allowable tags
174
-    $bbtags = array (
174
+    $bbtags = array(
175 175
         "@\[b\](.*?)\[/b\]@is",
176 176
         "@\[i\](.*?)\[/i\]@is",
177 177
         "@\[u\](.*?)\[/u\]@is",
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     
201 201
     // What the above tags are turned in to
202 202
     if ($export) {
203
-        $htmltags = array (
203
+        $htmltags = array(
204 204
             "<b>\\1</b>",
205 205
             "<i>\\1</i>",
206 206
             "<u>\\1</u>",
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             "<a href=\"https://github.com/BOINC/boinc-dev-doc/wiki/\\1\">\\1</a>",
228 228
         );
229 229
     } else {
230
-        $htmltags = array (
230
+        $htmltags = array(
231 231
             "<b>\\1</b>",
232 232
             "<i>\\1</i>",
233 233
             "<u>\\1</u>",
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     $lasttext = "";
260 260
     $i = 0;
261 261
     // $i<1000 to prevent DoS
262
-    while ($text != $lasttext && $i<1000) {
262
+    while ($text != $lasttext && $i < 1000) {
263 263
         $lasttext = $text;
264 264
         $text = replace_pre_code($text, $export);
265 265
         $text = preg_replace($bbtags, $htmltags, $text);
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 // for example inside <pre> containers
273 273
 // The original \n was retained after the br when it was added
274 274
 //
275
-function remove_br($text){
275
+function remove_br($text) {
276 276
     return str_replace("<br />", "", $text);
277 277
 }
278 278
 
@@ -280,19 +280,19 @@  discard block
 block discarded – undo
280 280
 //
281 281
 function externalize_links($text) {
282 282
     // TODO:  Convert this to PCRE
283
-    $i=0;
284
-    $linkpos=true;
283
+    $i = 0;
284
+    $linkpos = true;
285 285
     $out = "";
286
-    while (true){
286
+    while (true) {
287 287
         //Find a link
288 288
         //
289
-        $linkpos=strpos($text, "<a ", $i);
290
-        if ($linkpos===false) break;
289
+        $linkpos = strpos($text, "<a ", $i);
290
+        if ($linkpos === false) break;
291 291
 
292 292
         //Replace with target='_new'
293 293
         //
294
-        $out .= substr($text, $i, $linkpos-$i)."<a target=\"_new\" ";
295
-        $i = $linkpos+3;
294
+        $out .= substr($text, $i, $linkpos - $i)."<a target=\"_new\" ";
295
+        $i = $linkpos + 3;
296 296
     }
297 297
     $out .= substr($text, $i);
298 298
     return $out;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
 // Converts image tags to links to the images.
302 302
 
303
-function image_as_link($text){
303
+function image_as_link($text) {
304 304
     /* This function depends on sanitized HTML */
305 305
     // Build some regex (should be a *lot* faster)
306 306
     $pattern = '@<img([\S\s]+?)src=([^>]+?)>@si';
@@ -325,5 +325,5 @@  discard block
 block discarded – undo
325 325
     }
326 326
 }
327 327
 
328
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
328
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
329 329
 ?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 // for example inside <pre> containers
273 273
 // The original \n was retained after the br when it was added
274 274
 //
275
-function remove_br($text){
275
+function remove_br($text) {
276 276
     return str_replace("<br />", "", $text);
277 277
 }
278 278
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     $i=0;
284 284
     $linkpos=true;
285 285
     $out = "";
286
-    while (true){
286
+    while (true) {
287 287
         //Find a link
288 288
         //
289 289
         $linkpos=strpos($text, "<a ", $i);
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
 // Converts image tags to links to the images.
302 302
 
303
-function image_as_link($text){
303
+function image_as_link($text) {
304 304
     /* This function depends on sanitized HTML */
305 305
     // Build some regex (should be a *lot* faster)
306 306
     $pattern = '@<img([\S\s]+?)src=([^>]+?)>@si';
@@ -318,7 +318,8 @@  discard block
 block discarded – undo
318 318
     foreach ($search as $key => $value) {
319 319
         $replace[$key] = "<span class=\"mark\">".$value."</span>";
320 320
     }
321
-    if (substr(phpversion(), 0, 1) > 4) {   // PHP 4.x doesn't support str_ireplace
321
+    if (substr(phpversion(), 0, 1) > 4) {
322
+// PHP 4.x doesn't support str_ireplace
322 323
         return str_ireplace($search, $replace, $text);
323 324
     } else {
324 325
         return str_replace($search, $replace, $text);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 // Do the actual transformation of the text.
63 63
 // TODO: Make this part of the above class.
64 64
 
65
-function output_transform($text, $options = NULL) {
65
+function output_transform($text, $options = null) {
66 66
     // Options is a output_options object, defined above
67 67
     if (!$options) {
68 68
         $options = new output_options; // Defaults in the class definition
Please login to merge, or discard this patch.
html/inc/recaptcha_loader.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
 
12 12
 spl_autoload_register(function ($class) {
13 13
     if (substr($class, 0, 10) !== 'ReCaptcha\\') {
14
-      /* If the class does not lie under the "ReCaptcha" namespace,
14
+        /* If the class does not lie under the "ReCaptcha" namespace,
15 15
        * then we can exit immediately.
16 16
        */
17
-      return;
17
+        return;
18 18
     }
19 19
 
20 20
     /* All of the classes have names like "ReCaptcha\Foo", so we need
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * classes.
10 10
  */
11 11
 
12
-spl_autoload_register(function ($class) {
12
+spl_autoload_register(function($class) {
13 13
     if (substr($class, 0, 10) !== 'ReCaptcha\\') {
14 14
       /* If the class does not lie under the "ReCaptcha" namespace,
15 15
        * then we can exit immediately.
Please login to merge, or discard this patch.
html/inc/bbcode_convert.inc 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 require_once('../inc/sanitize_html.inc');
21 21
 
22
-function image_as_bb($text){
22
+function image_as_bb($text) {
23 23
     // This function depends on sanitized HTML
24 24
 
25 25
     $pattern = '@<img(.*) src=\"([^>^"]+)\"([^>]*)>@si';
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     return $text;
34 34
 }
35 35
 
36
-function link_as_bb($text){
36
+function link_as_bb($text) {
37 37
         /* This function depends on sanitized HTML */
38 38
     // Build some regex (should be a *lot* faster)
39 39
     $pattern = '@<a href=\"([^>]+)\">@si'; // Gives us the URL in $1...
@@ -49,35 +49,35 @@  discard block
 block discarded – undo
49 49
     return $text;
50 50
 }
51 51
 
52
-function formatting_as_bb($text){
52
+function formatting_as_bb($text) {
53 53
         /* This function depends on sanitized HTML */
54
-    $in[]="<b>";$out[]="[b]";
55
-    $in[]="</b>";$out[]="[/b]";
54
+    $in[] = "<b>"; $out[] = "[b]";
55
+    $in[] = "</b>"; $out[] = "[/b]";
56 56
 
57
-    $in[]="<i>";$out[]="[i]";
58
-    $in[]="</i>";$out[]="[/i]";
57
+    $in[] = "<i>"; $out[] = "[i]";
58
+    $in[] = "</i>"; $out[] = "[/i]";
59 59
 
60
-    $in[]="<u>";$out[]="[u]";
61
-    $in[]="</u>";$out[]="[/u]";
60
+    $in[] = "<u>"; $out[] = "[u]";
61
+    $in[] = "</u>"; $out[] = "[/u]";
62 62
 
63
-    $in[]="<b>";$out[]="[b]";
64
-    $in[]="</b>";$out[]="[/b]";
63
+    $in[] = "<b>"; $out[] = "[b]";
64
+    $in[] = "</b>"; $out[] = "[/b]";
65 65
 
66
-    $in[]="<ul>";$out[]="[list]";
67
-    $in[]="</ul>";$out[]="[/list]";
66
+    $in[] = "<ul>"; $out[] = "[list]";
67
+    $in[] = "</ul>"; $out[] = "[/list]";
68 68
 
69
-    $in[]="<ol>";$out[]="[list=1]";
70
-    $in[]="</ol>";$out[]="[/list]";
69
+    $in[] = "<ol>"; $out[] = "[list=1]";
70
+    $in[] = "</ol>"; $out[] = "[/list]";
71 71
 
72
-    $in[]="<pre>";$out[]="[pre]";
73
-    $in[]="</pre>";$out[]="[/pre]";
72
+    $in[] = "<pre>"; $out[] = "[pre]";
73
+    $in[] = "</pre>"; $out[] = "[/pre]";
74 74
 
75
-    $in[]="</br>";$out[]="\n";
76
-    $in[]="<br/>";$out[]="\n";
77
-    $in[]="<br>";$out[]="\n";
78
-    $in[]="&gt;";$out[]=">";
79
-    $in[]="&lt;";$out[]="<";
80
-    $in[]="&amp;";$out[]="&";
75
+    $in[] = "</br>"; $out[] = "\n";
76
+    $in[] = "<br/>"; $out[] = "\n";
77
+    $in[] = "<br>"; $out[] = "\n";
78
+    $in[] = "&gt;"; $out[] = ">";
79
+    $in[] = "&lt;"; $out[] = "<";
80
+    $in[] = "&amp;"; $out[] = "&";
81 81
 
82 82
     return str_replace($in, $out, $text);
83 83
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 require_once('../inc/sanitize_html.inc');
21 21
 
22
-function image_as_bb($text){
22
+function image_as_bb($text) {
23 23
     // This function depends on sanitized HTML
24 24
 
25 25
     $pattern = '@<img(.*) src=\"([^>^"]+)\"([^>]*)>@si';
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     return $text;
34 34
 }
35 35
 
36
-function link_as_bb($text){
36
+function link_as_bb($text) {
37 37
         /* This function depends on sanitized HTML */
38 38
     // Build some regex (should be a *lot* faster)
39 39
     $pattern = '@<a href=\"([^>]+)\">@si'; // Gives us the URL in $1...
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     return $text;
50 50
 }
51 51
 
52
-function formatting_as_bb($text){
52
+function formatting_as_bb($text) {
53 53
         /* This function depends on sanitized HTML */
54 54
     $in[]="<b>";$out[]="[b]";
55 55
     $in[]="</b>";$out[]="[/b]";
Please login to merge, or discard this patch.
html/inc/bolt_ex.inc 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 // The following is a global var accessed by exercise functions.
22 22
 //
23 23
 $bolt_ex = null;
24
-$bolt_ex->mode = 0;     // input: SHOW/SCORE/ANSWER
25
-$bolt_ex->index = 0;    // input: sequence of this exercise in file
26
-$bolt_ex->score = 0;    // input/output: cumulative score (if mode = SCORE)
27
-$bolt_ex->weight = 0;   // input/output: cumulative weight
28
-$bolt_ex->query_string = "";    // user's response (if SCORE or ANSWER)
24
+$bolt_ex->mode = 0; // input: SHOW/SCORE/ANSWER
25
+$bolt_ex->index = 0; // input: sequence of this exercise in file
26
+$bolt_ex->score = 0; // input/output: cumulative score (if mode = SCORE)
27
+$bolt_ex->weight = 0; // input/output: cumulative weight
28
+$bolt_ex->query_string = ""; // user's response (if SCORE or ANSWER)
29 29
 
30 30
 function weight($w) {
31 31
     return array('weight', $w);
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
             $response = isset($$key);
171 171
             $r = $choice[1];
172 172
             $correct = ($r && $response) || (!$r && !$response);
173
-            $color = $correct?"#88ff88":"#ff8888";
174
-            table_row($c, $r?"yes":"no",
175
-                array($response?"yes":"no", "bgcolor=$color")
173
+            $color = $correct ? "#88ff88" : "#ff8888";
174
+            table_row($c, $r ? "yes" : "no",
175
+                array($response ? "yes" : "no", "bgcolor=$color")
176 176
             );
177 177
             $i++;
178 178
         }
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
         if ($y > $rect[3]) $right = false;
216 216
         $cx = $rect[0];
217 217
         $cy = $rect[2];
218
-        $sizex = $rect[1]-$rect[0];
219
-        $sizey = $rect[3]-$rect[2];
220
-        $ax = $x-4;
221
-        $ay = $y-4;
222
-        $color = $right?"green":"red";
218
+        $sizex = $rect[1] - $rect[0];
219
+        $sizey = $rect[3] - $rect[2];
220
+        $ax = $x - 4;
221
+        $ay = $y - 4;
222
+        $color = $right ? "green" : "red";
223 223
         if ($right) {
224 224
             echo "The point you selected (shown in green) is correct.";
225 225
         } else {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 }
257 257
 
258 258
 class BoltFitbAnswer {
259
-    public $type;   // 0=constant, 1=regexp, 2=func
259
+    public $type; // 0=constant, 1=regexp, 2=func
260 260
     public $ans;
261 261
     function __construct($type, $ans) {
262 262
         $this->type = $type;
Please login to merge, or discard this patch.
html/inc/boinc_db.inc 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -358,10 +358,10 @@
 block discarded – undo
358 358
         $db = BoincDb::get();
359 359
         return $db->enum('result', 'BoincResult', $where_clause);
360 360
     }
361
-	static function enum_fields($fields, $where_clause, $order_clause) {
361
+    static function enum_fields($fields, $where_clause, $order_clause) {
362 362
         $db = BoincDb::get();
363
-		return $db->enum_fields('result', 'BoincResult', $fields, $where_clause, $order_clause);
364
-	}
363
+        return $db->enum_fields('result', 'BoincResult', $fields, $where_clause, $order_clause);
364
+    }
365 365
     function update($clause) {
366 366
         $db = BoincDb::get();
367 367
         return $db->update($this, 'result', $clause);
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -208,11 +208,11 @@  discard block
 block discarded – undo
208 208
         $db = BoincDb::get();
209 209
         return $db->update($this, 'user', $clause);
210 210
     }
211
-    static function enum($where_clause, $order_clause=null) {
211
+    static function enum($where_clause, $order_clause = null) {
212 212
         $db = BoincDb::get();
213 213
         return $db->enum('user', 'BoincUser', $where_clause, $order_clause);
214 214
     }
215
-    static function enum_fields($fields, $where_clause, $order_clause=null) {
215
+    static function enum_fields($fields, $where_clause, $order_clause = null) {
216 216
         $db = BoincDb::get();
217 217
         return $db->enum_fields(
218 218
             'user', 'BoincUser', $fields, $where_clause, $order_clause
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         $db = BoincDb::get();
262 262
         return $db->update($this, 'team', $clause);
263 263
     }
264
-    static function enum($where_clause, $order_clause=null) {
264
+    static function enum($where_clause, $order_clause = null) {
265 265
         $db = BoincDb::get();
266 266
         return $db->enum('team', 'BoincTeam', $where_clause, $order_clause);
267 267
     }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
         $db = BoincDb::get();
287 287
         return $db->max('team', $field);
288 288
     }
289
-    static function enum_fields($fields, $where_clause, $order_clause=null) {
289
+    static function enum_fields($fields, $where_clause, $order_clause = null) {
290 290
         $db = BoincDb::get();
291 291
         return $db->enum_fields(
292 292
             'team', 'BoincTeam', $fields, $where_clause, $order_clause
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
         $db = BoincDb::get();
323 323
         return $db->delete($this, 'host');
324 324
     }
325
-    static function enum($where_clause, $order_clause=null) {
325
+    static function enum($where_clause, $order_clause = null) {
326 326
         $db = BoincDb::get();
327 327
         return $db->enum('host', 'BoincHost', $where_clause, $order_clause);
328 328
     }
329
-    static function enum_fields($fields, $where_clause, $order_clause=null) {
329
+    static function enum_fields($fields, $where_clause, $order_clause = null) {
330 330
         $db = BoincDb::get();
331 331
         return $db->enum_fields(
332 332
             'host', 'BoincHost', $fields, $where_clause, $order_clause
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         $db = BoincDb::get();
446 446
         return $db->update($this, 'app', $clause);
447 447
     }
448
-    static function sum($field, $clause=null) {
448
+    static function sum($field, $clause = null) {
449 449
         $db = BoincDb::get();
450 450
         return $db->sum('app', $field, $clause);
451 451
     }
@@ -501,11 +501,11 @@  discard block
 block discarded – undo
501 501
         $db = BoincDb::get();
502 502
         return $db->insert('profile', $clause);
503 503
     }
504
-    static function enum($where_clause=null, $order_clause=null) {
504
+    static function enum($where_clause = null, $order_clause = null) {
505 505
         $db = BoincDb::get();
506 506
         return $db->enum('profile', 'BoincProfile', $where_clause, $order_clause);
507 507
     }
508
-    static function enum_fields($fields, $where_clause=null, $order_clause=null) {
508
+    static function enum_fields($fields, $where_clause = null, $order_clause = null) {
509 509
         $db = BoincDb::get();
510 510
         return $db->enum_fields('profile', 'BoincProfile', $fields, $where_clause, $order_clause);
511 511
     }
@@ -889,12 +889,12 @@  discard block
 block discarded – undo
889 889
         return $db->enum('consent', 'BoincConsent', $where_clause);
890 890
     }
891 891
 
892
-    static function insert ($clause) {
892
+    static function insert($clause) {
893 893
         $db = BoincDb::get();
894 894
         return $db->insert('consent', $clause);
895 895
     }
896 896
 
897
-    static function update ($clause) {
897
+    static function update($clause) {
898 898
         $db = BoincDb::get();
899 899
         return $db->update_aux('consent', $clause);
900 900
     }
@@ -918,17 +918,17 @@  discard block
 block discarded – undo
918 918
         return $db->lookup('consent_type', 'BoincConsentType', $clause);
919 919
     }
920 920
 
921
-    static function enum($where_clause, $order_clause=null) {
921
+    static function enum($where_clause, $order_clause = null) {
922 922
         $db = BoincDb::get();
923 923
         return $db->enum('consent_type', 'BoincConsentType', $where_clause, $order_clause);
924 924
     }
925 925
 
926
-    static function insert ($clause) {
926
+    static function insert($clause) {
927 927
         $db = BoincDb::get();
928 928
         return $db->insert('consent_type', $clause);
929 929
     }
930 930
 
931
-    static function update ($clause) {
931
+    static function update($clause) {
932 932
         $db = BoincDb::get();
933 933
         return $db->update_aux('consent_type', $clause);
934 934
     }
@@ -953,7 +953,7 @@  discard block
 block discarded – undo
953 953
         return $db->lookup('latest_consent', 'BoincLatestConsent', $clause);
954 954
     }
955 955
 
956
-    static function enum($where_clause, $order_clause=null) {
956
+    static function enum($where_clause, $order_clause = null) {
957 957
         $db = BoincDb::get();
958 958
         return $db->enum('latest_consent', 'BoincLatestConsent', $where_clause, $order_clause);
959 959
     }
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
 // apply this to any user-supplied strings used in queries
965 965
 // 
966 966
 function boinc_real_escape_string($x) {
967
-    if (version_compare(phpversion(),"4.3.0")>=0) {
967
+    if (version_compare(phpversion(), "4.3.0") >= 0) {
968 968
         return BoincDb::escape_string($x);
969 969
     } else {
970 970
         $x = str_replace("'", "\'", $x);
Please login to merge, or discard this patch.
html/inc/language_names.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
     global $language_names;
60 60
     $supported_languages = get_supported_languages();
61 61
     $supported_languages[] = "en";
62
-    $sel = $cur_lang_name?"":"selected";
62
+    $sel = $cur_lang_name ? "" : "selected";
63 63
     echo "
64 64
         <option $sel value=auto> Browser default
65 65
     ";
66 66
     foreach ($language_names as $lang) {
67 67
         if (!in_array($lang[0], $supported_languages)) continue;
68
-        $sel = ($cur_lang_name == $lang[0])?"selected":"";
68
+        $sel = ($cur_lang_name == $lang[0]) ? "selected" : "";
69 69
         if ($lang[0] == "en") {
70 70
             echo "<option $sel value=".$lang[0].">".$lang[1];
71 71
         } else {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 // show a menu of supported languages
79 79
 //
80
-function language_form($cur_lang_name=null) {
80
+function language_form($cur_lang_name = null) {
81 81
     echo '
82 82
         <form name="language" method="get" action="set_language.php">
83 83
         <select class="selectbox form-control" name="lang" onchange="javascript: submit()">
Please login to merge, or discard this patch.