Passed
Push — vko_fix_build ( f93f07...474d0d )
by Vitalii
10:23
created
html/inc/ReCaptcha/RequestParameters.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 /**
30 30
  * Stores and formats the parameters for the request to the reCAPTCHA service.
31 31
  */
32
-class RequestParameters
33
-{
32
+class RequestParameters {
34 33
     /**
35 34
      * Site secret.
36 35
      * @var string
@@ -63,8 +62,7 @@  discard block
 block discarded – undo
63 62
      * @param string $remoteIp User's IP address.
64 63
      * @param string $version Version of this client library.
65 64
      */
66
-    public function __construct($secret, $response, $remoteIp = null, $version = null)
67
-    {
65
+    public function __construct($secret, $response, $remoteIp = null, $version = null) {
68 66
         $this->secret = $secret;
69 67
         $this->response = $response;
70 68
         $this->remoteIp = $remoteIp;
@@ -76,8 +74,7 @@  discard block
 block discarded – undo
76 74
      *
77 75
      * @return array Array formatted parameters.
78 76
      */
79
-    public function toArray()
80
-    {
77
+    public function toArray() {
81 78
         $params = array('secret' => $this->secret, 'response' => $this->response);
82 79
 
83 80
         if (!is_null($this->remoteIp)) {
@@ -96,8 +93,7 @@  discard block
 block discarded – undo
96 93
      *
97 94
      * @return string Query string formatted parameters.
98 95
      */
99
-    public function toQueryString()
100
-    {
96
+    public function toQueryString() {
101 97
         return http_build_query($this->toArray(), '', '&');
102 98
     }
103 99
 }
Please login to merge, or discard this patch.
html/inc/dir_hier.inc 2 patches
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
     $dl_md5_path = "$dl_path.md5";
57 57
     $have_md5_file = false;
58 58
     $md5 = md5_file($path);
59
-    if ($md5 === FALSE) {
59
+    if ($md5 === false) {
60 60
         return -2;
61 61
     }
62 62
     $size = filesize($path);
63
-    if ($size === FALSE) {
63
+    if ($size === false) {
64 64
         return -2;
65 65
     }
66 66
 
67 67
     if (file_exists($dl_md5_path)) {
68 68
         $x = file_get_contents($dl_md5_path);
69
-        if ($x === FALSE) {
69
+        if ($x === false) {
70 70
             return -2;
71 71
         }
72 72
         $x = explode(" ", $x);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     if (file_exists($dl_path)) {
79 79
         if ($have_md5_file) {
80 80
             $s = filesize($dl_path);
81
-            if ($s === FALSE) {
81
+            if ($s === false) {
82 82
                 return -2;
83 83
             }
84 84
             if ($s == $dl_size && $dl_md5 == $md5) {
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
             // missing the .md5 file; need to look at the file
92 92
             //
93 93
             $m = md5_file($dl_path);
94
-            if ($m === FALSE) {
94
+            if ($m === false) {
95 95
                 return -2;
96 96
             }
97 97
             if ($m == $md5) {
98
-                if (file_put_contents($dl_md5_path, "$md5 $size\n") === FALSE) {
98
+                if (file_put_contents($dl_md5_path, "$md5 $size\n") === false) {
99 99
                     return -2;
100 100
                 }
101 101
                 return 0;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             return -1;
104 104
         }
105 105
     } else {
106
-        if (file_put_contents($dl_md5_path, "$md5 $size\n") === FALSE) {
106
+        if (file_put_contents($dl_md5_path, "$md5 $size\n") === false) {
107 107
             return -2;
108 108
         }
109 109
         return 1;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 }
38 38
 
39 39
 function upload_path($filename) {
40
-    static $upload_dir=null;
40
+    static $upload_dir = null;
41 41
     if (!$upload_dir) {
42 42
         $config = get_config();
43 43
         $upload_dir = parse_config($config, '<upload_dir>');
Please login to merge, or discard this patch.
html/inc/forum.inc 4 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -367,7 +367,7 @@
 block discarded – undo
367 367
                 $i++;
368 368
             }
369 369
             if ($start === null) {
370
-                echo "Post $postid not found.";
370
+                echo "post $postid not found.";
371 371
                 return;
372 372
             }
373 373
         } else if ($logged_in_user && $logged_in_user->prefs->jump_to_unread) {
Please login to merge, or discard this patch.
Braces   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
 // return a string for navigating pages
240 240
 //
241
-function page_links($url, $nitems, $items_per_page, $start){
241
+function page_links($url, $nitems, $items_per_page, $start) {
242 242
     // How many pages to potentially show before and after this one:
243 243
     $preshow = 3;
244 244
     $postshow = 3;
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
     // If this is not the first page, display "previous"
253 253
     //
254
-    if ($curpage > 0){
254
+    if ($curpage > 0) {
255 255
         $x .= page_link(
256 256
             $url, $curpage-1, $items_per_page,
257 257
             tra("Previous")." &middot; "
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     }
269 269
     // Display a list of pages surrounding this one
270 270
     //
271
-    for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){
271
+    for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++) {
272 272
         $page_str = (string)($i+1);
273 273
         if ($i < 0) continue;
274 274
         if ($i >= $npages) break;
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     }
290 290
     // If there is a next page
291 291
     //
292
-    if ($curpage < $npages-1){
292
+    if ($curpage < $npages-1) {
293 293
         $x .= page_link(
294 294
             $url, $curpage+1, $items_per_page,
295 295
             " &middot; ".tra("Next")
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 
519 519
     // If the user no longer exists, skip the post
520 520
     //
521
-    if (!$user){
521
+    if (!$user) {
522 522
         return;
523 523
     }
524 524
 
@@ -539,9 +539,9 @@  discard block
 block discarded – undo
539 539
     // check whether the poster is on the list of people to ignore
540 540
     //
541 541
     $ignore_poster = false;
542
-    if ($logged_in_user){
542
+    if ($logged_in_user) {
543 543
         $tokens = url_tokens($logged_in_user->authenticator);
544
-        if (is_ignoring($logged_in_user, $user)){
544
+        if (is_ignoring($logged_in_user, $user)) {
545 545
             $ignore_poster = true;
546 546
         }
547 547
     }
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 
579 579
     // Highlight special users if set in prefs;
580 580
     //
581
-    if ($logged_in_user && $logged_in_user->prefs){
581
+    if ($logged_in_user && $logged_in_user->prefs) {
582 582
         $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special;
583 583
     } else {
584 584
         $highlight = $is_posted_by_special;
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
     echo "<span class=\"small\">";
600 600
     if ($fstatus) echo "$fstatus";
601 601
 
602
-    if (!$filter || !$ignore_poster){
602
+    if (!$filter || !$ignore_poster) {
603 603
         if ($user->prefs && $user->prefs->avatar!="" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) {
604 604
             echo "<img width=\"".AVATAR_WIDTH."\" height=\"".AVATAR_HEIGHT."\" src=\"".avatar_url($user->prefs->avatar)."\" alt=\"Avatar\"><br>";
605 605
         }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
         $user->nposts = BoincPost::count("user=$user->id");
616 616
     }
617 617
 
618
-    if (function_exists('project_forum_user_info')){
618
+    if (function_exists('project_forum_user_info')) {
619 619
         project_forum_user_info($user);
620 620
     } else {
621 621
         echo tra("Posts: %1", $user->nposts)."<br>";
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
         echo "<form action=\"forum_rate.php?post=", $post->id, "\" method=\"post\">";
655 655
     }
656 656
 
657
-    if ($logged_in_user && $post->timestamp > $latest_viewed){
657
+    if ($logged_in_user && $post->timestamp > $latest_viewed) {
658 658
         show_image(NEW_IMAGE, tra("You haven't read this message yet"), tra("Unread"), NEW_IMAGE_HEIGHT);
659 659
     }
660 660
 
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
     if ($post->modified) {
675 675
         echo "<br>".tra("Last modified: %1", pretty_time_Str($post->modified));
676 676
     }
677
-    if ($ignore_poster && $filter){
677
+    if ($ignore_poster && $filter) {
678 678
         echo "<br>" .tra(
679 679
             "This post is hidden because the sender is on your 'ignore' list.  Click %1 here %2 to view hidden posts",
680 680
             "<a href=\"?id=".$thread->id."&amp;filter=false&amp;start=$start#".$post->id."\">",
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
         <p>
689 689
     ";
690 690
 
691
-    if (!$filter || !$ignore_poster){
691
+    if (!$filter || !$ignore_poster) {
692 692
         $posttext = $post->content;
693 693
 
694 694
         // If the creator of this post has a signature and
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
         // user has signatures enabled: show it
697 697
         //
698 698
         $posttext = output_transform($posttext, $options);
699
-        if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){
699
+        if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)) {
700 700
             $sig = output_transform($user->prefs->signature, $options);
701 701
             $posttext .= "<hr>$sig\n";
702 702
         }
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
     $content = output_transform($post->content, $options);
756 756
     $when = time_diff_str($post->timestamp, time());
757 757
     $user = BoincUser::lookup_id($post->user);
758
-    if (!$user){
758
+    if (!$user) {
759 759
         return;
760 760
     }
761 761
 
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
 
1090 1090
     $sql = 'forum = ' . $forumID ;
1091 1091
     $stickysql = "";
1092
-    if ($sticky){
1092
+    if ($sticky) {
1093 1093
         $stickysql = "sticky DESC, ";
1094 1094
     }
1095 1095
     if (!$show_hidden) {
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
 //
1171 1171
 function show_post_moderation_links(
1172 1172
     $config, $logged_in_user, $post, $forum, $tokens
1173
-){
1173
+) {
1174 1174
     $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban");
1175 1175
     $moderators_vote_to_ban = parse_bool($config, "moderators_vote_to_ban");
1176 1176
 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -811,9 +811,9 @@  discard block
 block discarded – undo
811 811
 function post_rules() {
812 812
     if (defined('FORUM_RULES')) return FORUM_RULES;
813 813
     if (function_exists("project_forum_post_rules")) {
814
-      $project_rules=project_forum_post_rules();
814
+        $project_rules=project_forum_post_rules();
815 815
     } else {
816
-      $project_rules="";
816
+        $project_rules="";
817 817
     }
818 818
     return sprintf("
819 819
         <ul>
@@ -1278,7 +1278,7 @@  discard block
 block discarded – undo
1278 1278
     }
1279 1279
     if ($thread->hidden) {
1280 1280
         error_page(
1281
-           tra("Can't post to a hidden thread.")
1281
+            tra("Can't post to a hidden thread.")
1282 1282
         );
1283 1283
     }
1284 1284
 
Please login to merge, or discard this patch.
Spacing   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 require_once("../inc/text_transform.inc");
25 25
 
26 26
 define('THREADS_PER_PAGE', 50);
27
-define('FORUM_LH_PCT', '25%');      // width of LH column
27
+define('FORUM_LH_PCT', '25%'); // width of LH column
28 28
 
29 29
 $forum_error = "";
30 30
     // for functions that return null on error,
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 define('THREAD_SOLVED', 1);
56 56
 
57 57
 define('AVATAR_WIDTH', 100);
58
-define('AVATAR_HEIGHT',100);
58
+define('AVATAR_HEIGHT', 100);
59 59
 
60 60
 define('ST_NEW_TIME', 1209600); //3600*24*14 - 14 days
61 61
 define('ST_NEW', 'New member');
@@ -80,24 +80,24 @@  discard block
 block discarded – undo
80 80
 define('IMAGE_HIDDEN', 'img/hidden.png');
81 81
 define('IMAGE_STICKY_LOCKED', 'img/sticky_locked_post.png');
82 82
 define('IMAGE_POST', 'img/post.png');
83
-define('NEW_IMAGE_HEIGHT','15');
83
+define('NEW_IMAGE_HEIGHT', '15');
84 84
 define('EMPHASIZE_IMAGE', 'img/emphasized_post.png');
85
-define('EMPHASIZE_IMAGE_HEIGHT','15');
85
+define('EMPHASIZE_IMAGE_HEIGHT', '15');
86 86
 define('FILTER_IMAGE', 'img/filtered_post.png');
87
-define('FILTER_IMAGE_HEIGHT','15');
87
+define('FILTER_IMAGE_HEIGHT', '15');
88 88
 define('RATE_POSITIVE_IMAGE', 'img/rate_positive.png');
89
-define('RATE_POSITIVE_IMAGE_HEIGHT','9');
89
+define('RATE_POSITIVE_IMAGE_HEIGHT', '9');
90 90
 define('RATE_NEGATIVE_IMAGE', 'img/rate_negative.png');
91
-define('RATE_NEGATIVE_IMAGE_HEIGHT','9');
91
+define('RATE_NEGATIVE_IMAGE_HEIGHT', '9');
92 92
 define('REPORT_POST_IMAGE', 'img/report_post.png');
93
-define('REPORT_POST_IMAGE_HEIGHT','9');
93
+define('REPORT_POST_IMAGE_HEIGHT', '9');
94 94
 
95 95
 define('SOLUTION', tra('This answered my question'));
96 96
 define('SUFFERER', tra('I also have this question'));
97 97
 define('OFF_TOPIC', tra('Off-topic'));
98 98
 
99
-define ('DEFAULT_LOW_RATING_THRESHOLD', -25);
100
-define ('DEFAULT_HIGH_RATING_THRESHOLD', 5);
99
+define('DEFAULT_LOW_RATING_THRESHOLD', -25);
100
+define('DEFAULT_HIGH_RATING_THRESHOLD', 5);
101 101
 
102 102
 // special user attributes
103 103
 //
@@ -175,15 +175,15 @@  discard block
 block discarded – undo
175 175
 
176 176
 // return forum/thread title, with links.
177 177
 //
178
-function forum_title($category, $forum, $thread, $link_thread=false) {
178
+function forum_title($category, $forum, $thread, $link_thread = false) {
179 179
     if ($category) {
180 180
         $is_helpdesk = $category->is_helpdesk;
181 181
     } else {
182 182
         $is_helpdesk = false;
183 183
     }
184 184
 
185
-    $where = $is_helpdesk?tra("Questions and Answers"):tra("Message boards");
186
-    $top_url = $is_helpdesk?"forum_help_desk.php":"forum_index.php";
185
+    $where = $is_helpdesk ?tra("Questions and Answers") : tra("Message boards");
186
+    $top_url = $is_helpdesk ? "forum_help_desk.php" : "forum_index.php";
187 187
 
188 188
     $x = '';
189 189
     if (!$forum && !$thread) {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     return $x;
218 218
 }
219 219
 
220
-function team_forum_title($forum, $thread=null, $link_thread=false) {
220
+function team_forum_title($forum, $thread = null, $link_thread = false) {
221 221
     $team = BoincTeam::lookup_id($forum->category);
222 222
     $x = sprintf('<a href="forum_index.php">%s</a> :',
223 223
         tra("Message boards")
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
 }
252 252
 
253 253
 function page_link($url, $page_num, $items_per_page, $text) {
254
-    return " <a href=\"$url&amp;start=" . $page_num*$items_per_page . "\">$text</a> ";
254
+    return " <a href=\"$url&amp;start=".$page_num*$items_per_page."\">$text</a> ";
255 255
 }
256 256
 
257 257
 // return a string for navigating pages
258 258
 //
259
-function page_links($url, $nitems, $items_per_page, $start){
259
+function page_links($url, $nitems, $items_per_page, $start) {
260 260
     // How many pages to potentially show before and after this one:
261 261
     $preshow = 3;
262 262
     $postshow = 3;
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
     $x = "";
265 265
 
266 266
     if ($nitems <= $items_per_page) return "";
267
-    $npages = ceil($nitems / $items_per_page);
268
-    $curpage = ceil($start / $items_per_page);
267
+    $npages = ceil($nitems/$items_per_page);
268
+    $curpage = ceil($start/$items_per_page);
269 269
 
270 270
     // If this is not the first page, display "previous"
271 271
     //
272
-    if ($curpage > 0){
272
+    if ($curpage > 0) {
273 273
         $x .= page_link(
274
-            $url, $curpage-1, $items_per_page,
274
+            $url, $curpage - 1, $items_per_page,
275 275
             tra("Previous")." &middot; "
276 276
         );
277 277
     }
@@ -286,8 +286,8 @@  discard block
 block discarded – undo
286 286
     }
287 287
     // Display a list of pages surrounding this one
288 288
     //
289
-    for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){
290
-        $page_str = (string)($i+1);
289
+    for ($i = $curpage - $preshow; $i <= $curpage + $postshow; $i++) {
290
+        $page_str = (string)($i + 1);
291 291
         if ($i < 0) continue;
292 292
         if ($i >= $npages) break;
293 293
 
@@ -296,20 +296,20 @@  discard block
 block discarded – undo
296 296
         } else {
297 297
             $x .= page_link($url, $i, $items_per_page, $page_str);
298 298
         }
299
-        if ($i == $npages-1) break;
300
-        if ($i == $curpage+$postshow) break;
299
+        if ($i == $npages - 1) break;
300
+        if ($i == $curpage + $postshow) break;
301 301
         $x .= " &middot; ";
302 302
     }
303 303
 
304
-    if ($curpage + $postshow < $npages-1) {
304
+    if ($curpage + $postshow < $npages - 1) {
305 305
         $x .= " . . . ";
306
-        $x .= page_link($url, $npages-1, $items_per_page, $npages);
306
+        $x .= page_link($url, $npages - 1, $items_per_page, $npages);
307 307
     }
308 308
     // If there is a next page
309 309
     //
310
-    if ($curpage < $npages-1){
310
+    if ($curpage < $npages - 1) {
311 311
         $x .= page_link(
312
-            $url, $curpage+1, $items_per_page,
312
+            $url, $curpage + 1, $items_per_page,
313 313
             " &middot; ".tra("Next")
314 314
         );
315 315
     }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 function cleanup_title($title) {
331 331
     $x = sanitize_tags(bb2html($title));
332 332
     $x = trim($x);
333
-    if (strlen($x)==0) return "(no title)";
333
+    if (strlen($x) == 0) return "(no title)";
334 334
     else return $x;
335 335
 }
336 336
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
             $i = 0;
393 393
             foreach ($posts as $post) {
394 394
                 if ($post->id == $postid) {
395
-                    $start = $i - ($i % $num_to_show);
395
+                    $start = $i - ($i%$num_to_show);
396 396
                     $jump_to_post = $post;
397 397
                     break;
398 398
                 }
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
             // if jump to post, figure out what page to show
420 420
             //
421 421
             if ($jump_to_post) {
422
-                $start = $ibest - ($ibest % $num_to_show);
422
+                $start = $ibest - ($ibest%$num_to_show);
423 423
             } else {
424 424
                 $start = $default_start;
425 425
             }
@@ -527,8 +527,8 @@  discard block
 block discarded – undo
527 527
 // Generates a table row with two cells: author and message
528 528
 //
529 529
 function show_post(
530
-    $post, $thread, $forum, $logged_in_user, $start=0,
531
-    $latest_viewed=0, $controls=FORUM_CONTROLS, $filter=true
530
+    $post, $thread, $forum, $logged_in_user, $start = 0,
531
+    $latest_viewed = 0, $controls = FORUM_CONTROLS, $filter = true
532 532
 ) {
533 533
     global $country_to_iso3166_2;
534 534
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 
537 537
     // If the user no longer exists, skip the post
538 538
     //
539
-    if (!$user){
539
+    if (!$user) {
540 540
         return;
541 541
     }
542 542
 
@@ -557,9 +557,9 @@  discard block
 block discarded – undo
557 557
     // check whether the poster is on the list of people to ignore
558 558
     //
559 559
     $ignore_poster = false;
560
-    if ($logged_in_user){
560
+    if ($logged_in_user) {
561 561
         $tokens = url_tokens($logged_in_user->authenticator);
562
-        if (is_ignoring($logged_in_user, $user)){
562
+        if (is_ignoring($logged_in_user, $user)) {
563 563
             $ignore_poster = true;
564 564
         }
565 565
     }
@@ -573,8 +573,8 @@  discard block
 block discarded – undo
573 573
             if (is_moderator($logged_in_user, $forum)) {
574 574
                 $can_edit = true;
575 575
             } else if (can_reply($thread, $forum, $logged_in_user)) {
576
-                $time_limit = $post->timestamp+MAXIMUM_EDIT_TIME;
577
-                $can_edit = time()<$time_limit;
576
+                $time_limit = $post->timestamp + MAXIMUM_EDIT_TIME;
577
+                $can_edit = time() < $time_limit;
578 578
             } else {
579 579
                 $can_edit = false;
580 580
             }
@@ -584,24 +584,24 @@  discard block
 block discarded – undo
584 584
     // Print the special user lines, if any
585 585
     //
586 586
     global $special_user_bitfield;
587
-    $fstatus="";
587
+    $fstatus = "";
588 588
     $keys = array_keys($special_user_bitfield);
589 589
     $is_posted_by_special = false;
590
-    for ($i=0; $i<sizeof($special_user_bitfield);$i++) {
590
+    for ($i = 0; $i < sizeof($special_user_bitfield); $i++) {
591 591
         if ($user->prefs && $user->prefs->privilege($keys[$i])) {
592
-            $fstatus.="<nobr>".$special_user_bitfield[$keys[$i]]."<nobr><br>";
592
+            $fstatus .= "<nobr>".$special_user_bitfield[$keys[$i]]."<nobr><br>";
593 593
             $is_posted_by_special = true;
594 594
         }
595 595
     }
596 596
 
597 597
     // Highlight special users if set in prefs;
598 598
     //
599
-    if ($logged_in_user && $logged_in_user->prefs){
599
+    if ($logged_in_user && $logged_in_user->prefs) {
600 600
         $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special;
601 601
     } else {
602 602
         $highlight = $is_posted_by_special;
603 603
     }
604
-    $class = $highlight?' style="border-left: 5px solid LightGreen" ':'';
604
+    $class = $highlight ? ' style="border-left: 5px solid LightGreen" ' : '';
605 605
 
606 606
     // row and start of author col
607 607
     //
@@ -613,12 +613,12 @@  discard block
 block discarded – undo
613 613
 
614 614
     echo user_links($user, 0, 30);
615 615
     echo "<br>";
616
-    if ($user->create_time > time()-ST_NEW_TIME) $fstatus.=ST_NEW."<br>";
616
+    if ($user->create_time > time() - ST_NEW_TIME) $fstatus .= ST_NEW."<br>";
617 617
     echo "<span class=\"small\">";
618 618
     if ($fstatus) echo "$fstatus";
619 619
 
620
-    if (!$filter || !$ignore_poster){
621
-        if ($user->prefs && $user->prefs->avatar!="" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) {
620
+    if (!$filter || !$ignore_poster) {
621
+        if ($user->prefs && $user->prefs->avatar != "" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars == false))) {
622 622
             echo "<img width=\"".AVATAR_WIDTH."\" height=\"".AVATAR_HEIGHT."\" src=\"".avatar_url($user->prefs->avatar)."\" alt=\"Avatar\"><br>";
623 623
         }
624 624
     }
@@ -626,14 +626,14 @@  discard block
 block discarded – undo
626 626
 
627 627
     $url = "pm.php?action=new&amp;userid=".$user->id;
628 628
     $name = $user->name;
629
-    show_button_small($url, tra("Send message"), tra("Send %1 a private message",$name));
629
+    show_button_small($url, tra("Send message"), tra("Send %1 a private message", $name));
630 630
     echo '<br>'.tra("Joined: %1", gmdate('j M y', $user->create_time)), "<br>";
631 631
 
632 632
     if (!isset($user->nposts)) {
633 633
         $user->nposts = BoincPost::count("user=$user->id");
634 634
     }
635 635
 
636
-    if (function_exists('project_forum_user_info')){
636
+    if (function_exists('project_forum_user_info')) {
637 637
         project_forum_user_info($user);
638 638
     } else {
639 639
         echo tra("Posts: %1", $user->nposts)."<br>";
@@ -642,8 +642,8 @@  discard block
 block discarded – undo
642 642
         //
643 643
         //echo "ID: ".$user->id."<br>";
644 644
         if (!NO_COMPUTING) {
645
-            echo tra("Credit: %1", number_format($user->total_credit)) ."<br>";
646
-            echo tra("RAC: %1",    number_format($user->expavg_credit))."<br>";
645
+            echo tra("Credit: %1", number_format($user->total_credit))."<br>";
646
+            echo tra("RAC: %1", number_format($user->expavg_credit))."<br>";
647 647
         }
648 648
 
649 649
         // to use this feature:
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
         echo "<form action=\"forum_rate.php?post=", $post->id, "\" method=\"post\">";
673 673
     }
674 674
 
675
-    if ($logged_in_user && $post->timestamp > $latest_viewed){
675
+    if ($logged_in_user && $post->timestamp > $latest_viewed) {
676 676
         show_image(NEW_IMAGE, tra("You haven't read this message yet"), tra("Unread"), NEW_IMAGE_HEIGHT);
677 677
     }
678 678
 
@@ -692,8 +692,8 @@  discard block
 block discarded – undo
692 692
     if ($post->modified) {
693 693
         echo "<br>".tra("Last modified: %1", pretty_time_Str($post->modified));
694 694
     }
695
-    if ($ignore_poster && $filter){
696
-        echo "<br>" .tra(
695
+    if ($ignore_poster && $filter) {
696
+        echo "<br>".tra(
697 697
             "This post is hidden because the sender is on your 'ignore' list.  Click %1 here %2 to view hidden posts",
698 698
             "<a href=\"?id=".$thread->id."&amp;filter=false&amp;start=$start#".$post->id."\">",
699 699
             "</a>"
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
         <p>
707 707
     ";
708 708
 
709
-    if (!$filter || !$ignore_poster){
709
+    if (!$filter || !$ignore_poster) {
710 710
         $posttext = $post->content;
711 711
 
712 712
         // If the creator of this post has a signature and
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
         // user has signatures enabled: show it
715 715
         //
716 716
         $posttext = output_transform($posttext, $options);
717
-        if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){
717
+        if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)) {
718 718
             $sig = output_transform($user->prefs->signature, $options);
719 719
             $posttext .= "<hr>$sig\n";
720 720
         }
@@ -748,10 +748,10 @@  discard block
 block discarded – undo
748 748
         }
749 749
         if (($controls == FORUM_CONTROLS) && (can_reply($thread, $forum, $logged_in_user))) {
750 750
             echo "&nbsp;&nbsp;&nbsp;&nbsp;";
751
-            $url = "forum_reply.php?thread=" . $thread->id . "&amp;post=" . $post->id . "&amp;no_quote=1#input";
751
+            $url = "forum_reply.php?thread=".$thread->id."&amp;post=".$post->id."&amp;no_quote=1#input";
752 752
             // "Reply" is used as a verb
753 753
             show_button($url, tra("Reply"), tra("Post a reply to this message"));
754
-            $url = "forum_reply.php?thread=" . $thread->id . "&amp;post=" . $post->id . "#input";
754
+            $url = "forum_reply.php?thread=".$thread->id."&amp;post=".$post->id."#input";
755 755
             // "Quote" is used as a verb
756 756
             show_button($url, tra("Quote"), tra("Post a reply by quoting this message"));
757 757
         }
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
     $content = output_transform($post->content, $options);
774 774
     $when = time_diff_str($post->timestamp, time());
775 775
     $user = BoincUser::lookup_id($post->user);
776
-    if (!$user){
776
+    if (!$user) {
777 777
         return;
778 778
     }
779 779
 
@@ -787,10 +787,10 @@  discard block
 block discarded – undo
787 787
     switch ($forum->parent_type) {
788 788
     case 0:
789 789
         $category = BoincCategory::lookup_id($forum->category);
790
-        $title= forum_title($category, $forum, $thread, true);
790
+        $title = forum_title($category, $forum, $thread, true);
791 791
         break;
792 792
     case 1:
793
-        $title= team_forum_title($forum);
793
+        $title = team_forum_title($forum);
794 794
         break;
795 795
     }
796 796
     row_array([
@@ -828,9 +828,9 @@  discard block
 block discarded – undo
828 828
 function post_rules() {
829 829
     if (defined('FORUM_RULES')) return FORUM_RULES;
830 830
     if (function_exists("project_forum_post_rules")) {
831
-      $project_rules=project_forum_post_rules();
831
+      $project_rules = project_forum_post_rules();
832 832
     } else {
833
-      $project_rules="";
833
+      $project_rules = "";
834 834
     }
835 835
     return sprintf("
836 836
         <ul>
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
     );
860 860
 }
861 861
 
862
-function post_warning($forum=null) {
862
+function post_warning($forum = null) {
863 863
     $x = '<p><div style="text-align:left">';
864 864
 
865 865
     // let projects add extra instructions in specific forums,
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
     $content = substr($content, 0, 64000);
946 946
     $content = BoincDb::escape_string($content);
947 947
     $now = time();
948
-    $sig = $signature?1:0;
948
+    $sig = $signature ? 1 : 0;
949 949
     $id = BoincPost::insert("(thread, user, timestamp, content, modified, parent_post, score, votes, signature, hidden) values ($thread->id, $user->id, $now, '$content', 0, $parent_id, 0, 0, $sig, 0)");
950 950
     if (!$id) {
951 951
         $forum_error = "Failed to add post to DB.";
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 //
966 966
 function update_thread_timestamp($thread) {
967 967
     $posts = BoincPost::enum("thread=$thread->id and hidden=0 order by timestamp desc limit 1");
968
-    if (count($posts)>0) {
968
+    if (count($posts) > 0) {
969 969
         $post = $posts[0];
970 970
         $thread->update("timestamp=$post->timestamp");
971 971
     }
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
 
974 974
 function update_forum_timestamp($forum) {
975 975
     $threads = BoincThread::enum("forum=$forum->id and hidden=0 order by timestamp desc limit 1");
976
-    if (count($threads)>0) {
976
+    if (count($threads) > 0) {
977 977
         $thread = $threads[0];
978 978
         $forum->update("timestamp=$thread->timestamp");
979 979
     }
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
     if (is_news_forum($forum) && !$export) {
997 997
         $status = 1;
998 998
     }
999
-    $id  = BoincThread::insert("(forum, owner, status, title, timestamp, views, replies, activity, sufferers, score, votes, create_time, hidden, sticky, locked) values ($forum->id, $user->id, $status, '$title', $now, 0, -1, 0, 0, 0, 0, $now, 0, 0, 0)");
999
+    $id = BoincThread::insert("(forum, owner, status, title, timestamp, views, replies, activity, sufferers, score, votes, create_time, hidden, sticky, locked) values ($forum->id, $user->id, $status, '$title', $now, 0, -1, 0, 0, 0, 0, $now, 0, 0, 0)");
1000 1000
     if (!$id) {
1001 1001
         $forum_error = "Failed to add thread to DB.";
1002 1002
         return null;
@@ -1125,22 +1125,22 @@  discard block
 block discarded – undo
1125 1125
 // $sticky - bool (not directly passed to SQL)
1126 1126
 //
1127 1127
 function get_forum_threads(
1128
-    $forumID, $start=-1, $nRec=-1, $sort_style=MODIFIED_NEW,
1128
+    $forumID, $start = -1, $nRec = -1, $sort_style = MODIFIED_NEW,
1129 1129
     $show_hidden = 0, $sticky = 1
1130 1130
 ) {
1131 1131
     //if (! (is_numeric($forumID) && is_numeric($min) && is_numeric($nRec))) {
1132 1132
     //    return NULL;  // Something is wrong here.
1133 1133
     //}
1134 1134
 
1135
-    $sql = 'forum = ' . $forumID ;
1135
+    $sql = 'forum = '.$forumID;
1136 1136
     $stickysql = "";
1137
-    if ($sticky){
1137
+    if ($sticky) {
1138 1138
         $stickysql = "sticky DESC, ";
1139 1139
     }
1140 1140
     if (!$show_hidden) {
1141 1141
         $sql .= ' AND hidden = 0';
1142 1142
     }
1143
-    switch($sort_style) {
1143
+    switch ($sort_style) {
1144 1144
     case MODIFIED_NEW:
1145 1145
         $sql .= ' ORDER BY '.$stickysql.'timestamp DESC';
1146 1146
         break;
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
     if (!$show_hidden) {
1194 1194
         $sql .= ' AND hidden = 0';
1195 1195
     }
1196
-    switch($sort_style) {
1196
+    switch ($sort_style) {
1197 1197
     case CREATE_TIME_NEW:
1198 1198
         $sql .= ' ORDER BY timestamp desc';
1199 1199
         break;
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
 //
1216 1216
 function show_post_moderation_links(
1217 1217
     $config, $logged_in_user, $post, $forum, $tokens
1218
-){
1218
+) {
1219 1219
     $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban");
1220 1220
     $moderators_vote_to_ban = parse_bool($config, "moderators_vote_to_ban");
1221 1221
 
@@ -1278,9 +1278,9 @@  discard block
 block discarded – undo
1278 1278
 //
1279 1279
 function user_can_create_thread($user, $forum) {
1280 1280
     if ($forum->is_dev_blog) {
1281
-        return is_admin($user)?'yes':'no';
1281
+        return is_admin($user) ? 'yes' : 'no';
1282 1282
     }
1283
-    return $user ?'yes':'login';
1283
+    return $user ? 'yes' : 'login';
1284 1284
 }
1285 1285
 
1286 1286
 function check_post_access($user, $forum) {
@@ -1306,14 +1306,14 @@  discard block
 block discarded – undo
1306 1306
     // We do not tell the (ab)user how much this is -
1307 1307
     // no need to make it easy for them to break the system.
1308 1308
     //
1309
-    if ($user->total_credit<$forum->post_min_total_credit || $user->expavg_credit<$forum->post_min_expavg_credit) {
1309
+    if ($user->total_credit < $forum->post_min_total_credit || $user->expavg_credit < $forum->post_min_expavg_credit) {
1310 1310
         error_page(tra("To create a new thread in %1 you must have a certain level of average credit. This is to protect against abuse of the system.", $forum->title));
1311 1311
     }
1312 1312
 
1313 1313
     // If the user is posting faster than forum regulations allow
1314 1314
     // Tell the user to wait a while before creating any more posts
1315 1315
     //
1316
-    if (time()-$user->prefs->last_post <$forum->post_min_interval) {
1316
+    if (time() - $user->prefs->last_post < $forum->post_min_interval) {
1317 1317
         error_page(tra("You cannot create threads right now. Please wait before trying again. This is to protect against abuse of the system."));
1318 1318
     }
1319 1319
 }
@@ -1339,10 +1339,10 @@  discard block
 block discarded – undo
1339 1339
 // - edit their posts at any time
1340 1340
 // - hide/unhide/move threads and posts
1341 1341
 
1342
-function is_moderator($user, $forum=null) {
1342
+function is_moderator($user, $forum = null) {
1343 1343
     if (!$user) return false;
1344 1344
     BoincForumPrefs::lookup($user);
1345
-    $type = $forum?$forum->parent_type:0;
1345
+    $type = $forum ? $forum->parent_type : 0;
1346 1346
     switch ($type) {
1347 1347
     case 0:
1348 1348
         if ($user->prefs->privilege(S_MODERATOR)) return true;
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
     return false;
1360 1360
 }
1361 1361
 
1362
-function thread_list_header($subscriptions=false) {
1362
+function thread_list_header($subscriptions = false) {
1363 1363
     if ($subscriptions) {
1364 1364
         $x = [
1365 1365
             tra("Thread"),
@@ -1382,13 +1382,13 @@  discard block
 block discarded – undo
1382 1382
 // show a 1-line summary of thread and its forum.
1383 1383
 // Used for search results and subscription list
1384 1384
 //
1385
-function thread_list_item($thread, $user, $subscriptions=false) {
1385
+function thread_list_item($thread, $user, $subscriptions = false) {
1386 1386
     $thread_forum = BoincForum::lookup_id($thread->forum);
1387 1387
     if (!$thread_forum) return;
1388 1388
     if (!is_forum_visible_to_user($thread_forum, $user)) return;
1389 1389
     $owner = BoincUser::lookup_id($thread->owner);
1390 1390
     if (!$owner) return;
1391
-    switch($thread_forum->parent_type) {
1391
+    switch ($thread_forum->parent_type) {
1392 1392
     case 0:
1393 1393
         $category = BoincCategory::lookup_id($thread_forum->category);
1394 1394
         $title = forum_title($category, $thread_forum, $thread, true);
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
     } else {
1410 1410
         $x = [
1411 1411
             $title,
1412
-            $thread->replies+1,
1412
+            $thread->replies + 1,
1413 1413
             user_links($owner),
1414 1414
             $thread->views,
1415 1415
             time_diff_str($thread->timestamp, time())
@@ -1446,13 +1446,13 @@  discard block
 block discarded – undo
1446 1446
 
1447 1447
 function subscribed_thread_web_line($notify) {
1448 1448
     $thread = BoincThread::lookup_id($notify->opaque);
1449
-    return tra("New posts in the thread %1","<a href=forum_thread.php?id=$thread->id>$thread->title</a>");
1449
+    return tra("New posts in the thread %1", "<a href=forum_thread.php?id=$thread->id>$thread->title</a>");
1450 1450
 }
1451 1451
 
1452 1452
 function subscribed_thread_rss($notify) {
1453 1453
     $thread = BoincThread::lookup_id($notify->opaque);
1454 1454
     $title = tra("New posts in subscribed thread");
1455
-    $msg = tra("There are new posts in the thread '%1'",$thread->title);
1455
+    $msg = tra("There are new posts in the thread '%1'", $thread->title);
1456 1456
     $url = secure_url_base()."forum_thread.php?id=$thread->id";
1457 1457
     return [$title, $msg, $url];
1458 1458
 }
@@ -1464,13 +1464,13 @@  discard block
 block discarded – undo
1464 1464
 
1465 1465
 function subscribed_forum_web_line($notify) {
1466 1466
     $forum = BoincForum::lookup_id($notify->opaque);
1467
-    return tra("New threads in the forum %1","<a href=forum_forum.php?id=$forum->id>$forum->title</a>");
1467
+    return tra("New threads in the forum %1", "<a href=forum_forum.php?id=$forum->id>$forum->title</a>");
1468 1468
 }
1469 1469
 
1470 1470
 function subscribed_forum_rss($notify) {
1471 1471
     $forum = BoincForum::lookup_id($notify->opaque);
1472 1472
     $title = tra("New posts in subscribed forum");
1473
-    $msg = tra("There are new threads in the forum '%1'",$forum->title);
1473
+    $msg = tra("There are new threads in the forum '%1'", $forum->title);
1474 1474
     $url = secure_url_base()."forum_forum.php?id=$forum->id";
1475 1475
     return [$title, $msg, $url];
1476 1476
 }
Please login to merge, or discard this patch.
html/inc/prefs.inc 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -556,7 +556,7 @@
 block discarded – undo
556 556
 function print_prefs_form(
557 557
     $action, $subset, $venue, $user, $prefs, $cols, $error=false,
558 558
     $project_error=false
559
-){
559
+) {
560 560
     if ($action == "add") {
561 561
         $script = "add_venue.php";
562 562
         $submit_value = tra("Add preferences");
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         new NUM_SPEC(tra("% of the CPUs"), 1, 100, 0)
109 109
     ),
110 110
     new PREF_NUM(
111
-        tra("Use at most") ."<br><font size=-2>Requires BOINC 7.20.3+</font>",
111
+        tra("Use at most")."<br><font size=-2>Requires BOINC 7.20.3+</font>",
112 112
         // xgettext:no-php-format
113 113
         tra("Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat."),
114 114
         "niu_cpu_usage_limit",
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
     $dp->disk_max_used_pct = parse_config($config, "<default_disk_max_used_pct>");
296 296
     $dp->disk_min_free_gb = parse_config($config, "<default_disk_min_free_gb>");
297 297
     // set some defaults if not found
298
-    if (!$dp->disk_max_used_gb) $dp->disk_max_used_gb = 0;  // no limit
298
+    if (!$dp->disk_max_used_gb) $dp->disk_max_used_gb = 0; // no limit
299 299
     if (!$dp->disk_max_used_pct) $dp->disk_max_used_pct = 90; // 90 percent
300
-    if (!$dp->disk_min_free_gb) $dp->disk_min_free_gb = 1;   // 1 GB
300
+    if (!$dp->disk_min_free_gb) $dp->disk_min_free_gb = 1; // 1 GB
301 301
     // set mininimum free space scheduler allows
302 302
     // - depends on which scheduler is running
303 303
     $dp->new_sched_flag = 1;
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
     global $text;
324 324
     global $venue_name;
325 325
 
326
-    switch($name) {
326
+    switch ($name) {
327 327
     case "venue":
328 328
         if (array_key_exists("name", $attrs)) {
329 329
             $venue_name = $attrs["name"];
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             return;
374 374
         }
375 375
     }
376
-    switch($name) {
376
+    switch ($name) {
377 377
     case "venue":
378 378
         $top_parse_result->$venue_name = $parse_result;
379 379
         $parse_result = $top_parse_result;
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
     }
548 548
 }
549 549
 
550
-function print_prefs_display_global($user, $columns=false) {
550
+function print_prefs_display_global($user, $columns = false) {
551 551
     $global_prefs = prefs_parse_global($user->global_prefs);
552 552
 
553 553
     echo tra("These settings apply to all computers using this account except")
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
         .tra("Android devices")
558 558
         ."</ul>
559 559
     ";
560
-    $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=global&cols=". (int)!$columns .">".tra("(Switch view)")."</a></font>";
560
+    $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=global&cols=".(int)!$columns.">".tra("(Switch view)")."</a></font>";
561 561
     if ($columns) {
562 562
         echo "<h3>".tra("Combined preferences").$switch_link."</h3>";
563 563
         start_table();
@@ -594,9 +594,9 @@  discard block
 block discarded – undo
594 594
 // otherwise false
595 595
 //
596 596
 function print_prefs_form(
597
-    $action, $subset, $venue, $user, $prefs, $cols, $error=false,
598
-    $project_error=false
599
-){
597
+    $action, $subset, $venue, $user, $prefs, $cols, $error = false,
598
+    $project_error = false
599
+) {
600 600
     if ($action == "add") {
601 601
         $script = "add_venue.php";
602 602
         $submit_value = tra("Add preferences");
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 //
637 637
 // Functions to display preference subsets as forms
638 638
 //
639
-function prefs_form_global($user, $prefs, $error=false) {
639
+function prefs_form_global($user, $prefs, $error = false) {
640 640
     global $in_use_prefs;
641 641
     global $not_in_use_prefs;
642 642
     global $job_prefs;
@@ -673,9 +673,9 @@  discard block
 block discarded – undo
673 673
 //
674 674
 function prefs_form_radio_buttons($name, $yesno) {
675 675
     $rb = tra("yes")." <input type=radio name=$name value=yes "
676
-        .($yesno?"checked":"")
676
+        .($yesno ? "checked" : "")
677 677
         ."> ".tra("no")." <input type=radio name=$name value=no "
678
-        .($yesno?"":"checked")
678
+        .($yesno ? "" : "checked")
679 679
         .">\n";
680 680
     return $rb;
681 681
 }
@@ -694,12 +694,12 @@  discard block
 block discarded – undo
694 694
 }
695 695
 function venue_show($user) {
696 696
     $venue = $user->venue;
697
-    if ($venue =='') $venue = '---';
697
+    if ($venue == '') $venue = '---';
698 698
     tooltip_row2(VENUE_TOOLTIP, VENUE_DESC, $venue);
699 699
 }
700 700
 
701 701
 function venue_form($user) {
702
-    $n=$h=$w=$s=$m='';
702
+    $n = $h = $w = $s = $m = '';
703 703
     if ($user->venue == '') $n = 'selected';
704 704
     if ($user->venue == 'home') $h = 'selected';
705 705
     if ($user->venue == 'work') $w = 'selected';
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 //
758 758
 // convert prefs from structure to XML
759 759
 //
760
-function global_prefs_make_xml($prefs, $primary=true) {
760
+function global_prefs_make_xml($prefs, $primary = true) {
761 761
     global $in_use_prefs;
762 762
     global $not_in_use_prefs;
763 763
     global $job_prefs;
Please login to merge, or discard this patch.
html/inc/result.inc 2 patches
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -500,9 +500,9 @@  discard block
 block discarded – undo
500 500
 // @return String A human readable error message
501 501
 // @param Integer $x An error number
502 502
 //
503
-function windows_error_code_str($x){
503
+function windows_error_code_str($x) {
504 504
     $h=int2hex($x);
505
-    switch($h){
505
+    switch($h) {
506 506
     case "0xC0000005": return "STATUS_ACCESS_VIOLATION";
507 507
     case "0xC000001D": return "STATUS_ILLEGAL_INSTRUCTION";
508 508
     case "0xC0000094": return "STATUS_INTEGER_DIVIDE_BY_ZERO";
@@ -523,10 +523,10 @@  discard block
 block discarded – undo
523 523
 // @return String A human readable error message
524 524
 // @param Integer $x An error number
525 525
 //
526
-function error_code_str($x){
526
+function error_code_str($x) {
527 527
     // severe Windows error numbers are always large negative integers
528 528
     if ($x<-400) return windows_error_code_str($x);
529
-    switch($x){
529
+    switch($x) {
530 530
     case 0: return "";
531 531
     case 192: return "EXIT_STATEFILE_WRITE";
532 532
     case 193: return "EXIT_SIGNAL";
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
     return $platforms[$id];
54 54
 }
55 55
 
56
-function anon_platform_string($result, $rsc_name=null) {
56
+function anon_platform_string($result, $rsc_name = null) {
57 57
     $app = get_app($result->appid);
58
-    $n = $app->user_friendly_name."<br>".  tra("Anonymous platform");
58
+    $n = $app->user_friendly_name."<br>".tra("Anonymous platform");
59 59
     if ($rsc_name) {
60 60
         $n .= " ($rsc_name)";
61 61
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         return $string_to_show;
100 100
     }
101 101
     if ($result->server_state <> RESULT_SERVER_STATE_OVER) return "---";
102
-    switch($result->outcome) {
102
+    switch ($result->outcome) {
103 103
     case RESULT_OUTCOME_SUCCESS:
104 104
         switch ($result->validate_state) {
105 105
         case VALIDATE_STATE_INIT:
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             ) {
215 215
                 return tra("Not started by deadline - canceled");
216 216
             }
217
-            switch($result->client_state) {
217
+            switch ($result->client_state) {
218 218
             case RESULT_FILES_DOWNLOADING: return tra("Error while downloading");
219 219
             case RESULT_FILES_DOWNLOADED:
220 220
             case RESULT_COMPUTE_ERROR: return tra("Error while computing");
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 }
234 234
 
235 235
 function result_server_state_string($result) {
236
-    switch($result->server_state) {
236
+    switch ($result->server_state) {
237 237
     case RESULT_SERVER_STATE_INACTIVE: return tra("Inactive");
238 238
     case RESULT_SERVER_STATE_UNSENT: return tra("Unsent");
239 239
     case RESULT_SERVER_STATE_IN_PROGRESS: return tra("In progress");
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 }
244 244
 
245 245
 function result_outcome_string($result) {
246
-    switch($result->outcome) {
246
+    switch ($result->outcome) {
247 247
     case RESULT_OUTCOME_INIT: return "---";
248 248
     case RESULT_OUTCOME_SUCCESS: return tra("Success");
249 249
     case RESULT_OUTCOME_COULDNT_SEND: return tra("Couldn't send");
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 }
262 262
 
263 263
 function result_client_state_string($result) {
264
-    switch($result->client_state) {
264
+    switch ($result->client_state) {
265 265
     case RESULT_NEW: return tra("New");
266 266
     case RESULT_FILES_DOWNLOADING: return tra("Downloading");
267 267
     case RESULT_FILES_DOWNLOADED: return tra("Processing");
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 }
280 280
 
281 281
 function validate_state_str($result) {
282
-    switch($result->validate_state) {
282
+    switch ($result->validate_state) {
283 283
     case VALIDATE_STATE_INIT: return tra("Initial");
284 284
     case VALIDATE_STATE_VALID: return tra("Valid");
285 285
     case VALIDATE_STATE_INVALID:
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 }
296 296
 
297 297
 function assimilate_state_str($s) {
298
-    switch($s) {
298
+    switch ($s) {
299 299
     case ASSIMILATE_INIT: return "Initial";
300 300
     case ASSIMILATE_READY: return "Ready to assimilate";
301 301
     case ASSIMILATE_DONE: return "Assimilated";
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 }
305 305
 
306 306
 function file_delete_state_str($s) {
307
-    switch($s) {
307
+    switch ($s) {
308 308
     case FILE_DELETE_INIT: return "Initial";
309 309
     case FILE_DELETE_READY: return "Ready to delete";
310 310
     case FILE_DELETE_DONE: return "Deleted";
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 // convert WU error bitmask to str.
317 317
 // If $color, add HTML red color
318 318
 //
319
-function wu_error_mask_str($s, $color=false) {
319
+function wu_error_mask_str($s, $color = false) {
320 320
     $x = "";
321 321
     if ($s & WU_ERROR_COULDNT_SEND_RESULT) {
322 322
         $x = $x." ".tra("Couldn't send result");
@@ -430,10 +430,10 @@  discard block
 block discarded – undo
430 430
     if ($result->received_time) {
431 431
         $r = time_str($result->received_time);
432 432
     } else if ($result->report_deadline) {
433
-        if ($result->report_deadline>time()) {
434
-            $r = "<font color='#33cc33'>" . time_str($result->report_deadline) . "</font>";
433
+        if ($result->report_deadline > time()) {
434
+            $r = "<font color='#33cc33'>".time_str($result->report_deadline)."</font>";
435 435
         } else {
436
-            $r = "<font color='#ff3333'>" . time_str($result->report_deadline) . "</font>";
436
+            $r = "<font color='#ff3333'>".time_str($result->report_deadline)."</font>";
437 437
         }
438 438
     } else {
439 439
         $r = "---";
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 // @param Integer $dec A signed integer
495 495
 //
496 496
 function int2hex($dec) {
497
-    return "0x".strtoupper(substr(sprintf("%08x",$dec), -8));
497
+    return "0x".strtoupper(substr(sprintf("%08x", $dec), -8));
498 498
 }
499 499
 
500 500
 // Decode a windows error number into semi-human-readable,
@@ -504,9 +504,9 @@  discard block
 block discarded – undo
504 504
 // @return String A human readable error message
505 505
 // @param Integer $x An error number
506 506
 //
507
-function windows_error_code_str($x){
508
-    $h=int2hex($x);
509
-    switch($h){
507
+function windows_error_code_str($x) {
508
+    $h = int2hex($x);
509
+    switch ($h) {
510 510
     case "0xC0000005": return "STATUS_ACCESS_VIOLATION";
511 511
     case "0xC000001D": return "STATUS_ILLEGAL_INSTRUCTION";
512 512
     case "0xC0000094": return "STATUS_INTEGER_DIVIDE_BY_ZERO";
@@ -527,10 +527,10 @@  discard block
 block discarded – undo
527 527
 // @return String A human readable error message
528 528
 // @param Integer $x An error number
529 529
 //
530
-function error_code_str($x){
530
+function error_code_str($x) {
531 531
     // severe Windows error numbers are always large negative integers
532
-    if ($x<-400) return windows_error_code_str($x);
533
-    switch($x){
532
+    if ($x < -400) return windows_error_code_str($x);
533
+    switch ($x) {
534 534
     case 0: return "";
535 535
     case 192: return "EXIT_STATEFILE_WRITE";
536 536
     case 193: return "EXIT_SIGNAL";
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
     return $x." (".int2hex($x).") ".error_code_str($x);
692 692
 }
693 693
 
694
-function show_result($result, $show_outfile_links=false) {
694
+function show_result($result, $show_outfile_links = false) {
695 695
     start_table();
696 696
     row2(tra("Name"), $result->name);
697 697
     row2(tra("Workunit"), "<a href=\"workunit.php?wuid=$result->workunitid\">$result->workunitid</a>");
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
     echo "<h3>".tra("Stderr output")."</h3> <pre>"
743 743
         .htmlspecialchars(
744 744
             $result->stderr_out,
745
-            ENT_QUOTES | (defined('ENT_SUBSTITUTE')?ENT_SUBSTITUTE:0),
745
+            ENT_QUOTES|(defined('ENT_SUBSTITUTE') ?ENT_SUBSTITUTE:0),
746 746
             'utf-8'
747 747
         )
748 748
         ."</pre>"
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 
758 758
     $apps = BoincApp::enum('deprecated=0 ORDER BY user_friendly_name');
759 759
 
760
-    for ($i=0; $i<NSTATES; $i++) {
760
+    for ($i = 0; $i < NSTATES; $i++) {
761 761
         $state_count[$i] = 0;
762 762
     }
763 763
     foreach ($apps as $app) {
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
         $x .= "<a href=$url>".tra("Next")." ".$info->results_per_page."</a>";
801 801
     }
802 802
     $x .= "<br>".tra("State").": ";
803
-    for ($i=0; $i<NSTATES; $i++) {
803
+    for ($i = 0; $i < NSTATES; $i++) {
804 804
         if ($i) $x .= " &middot; ";
805 805
         if ($info->state == $i) {
806 806
             $x .= $state_name[$i];
Please login to merge, or discard this patch.
html/inc/countries.inc 2 patches
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.
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.
html/project.sample/project.inc 2 patches
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
     </ol>", PROJECT);
184 184
 }
185 185
 
186
-function project_workunit($wu){
186
+function project_workunit($wu) {
187 187
     // shown in the workunit page
188 188
 }
189 189
 
190
-function project_user_summary($user){
190
+function project_user_summary($user) {
191 191
     // shown in the user summary page
192 192
 }
193 193
 
194
-function project_user_page_private($user){
194
+function project_user_page_private($user) {
195 195
     // shown in the private account page
196 196
 }
197 197
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     array("name" => "Uppercase", "short_name" => "UC", "appids" => array(1, 25)),
259 259
 );
260 260
 
261
-function project_user_credit($user){
261
+function project_user_credit($user) {
262 262
     global $sub_projects;
263 263
     foreach ($sub_projects as $sp) {
264 264
         show_app_credit_user($user, $sp["name"], $sp["appids"]);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 define('UNIQUE_USER_NAME', true);
51 51
 define("FORUM_QA_MERGED_MODE", true);
52 52
     // Set to true to merge Message boards and Q&A section
53
-define ("DISABLE_PROFILES", true);
53
+define("DISABLE_PROFILES", true);
54 54
     // enable profiles only after enabling reCAPTCHA
55 55
     // https://github.com/BOINC/boinc/wiki/ProtectionFromSpam
56 56
 define("USE_STOPFORUMSPAM", true);
@@ -191,15 +191,15 @@  discard block
 block discarded – undo
191 191
     </ol>", PROJECT);
192 192
 }
193 193
 
194
-function project_workunit($wu){
194
+function project_workunit($wu) {
195 195
     // shown in the workunit page
196 196
 }
197 197
 
198
-function project_user_summary($user){
198
+function project_user_summary($user) {
199 199
     // shown in the user summary page
200 200
 }
201 201
 
202
-function project_user_page_private($user){
202
+function project_user_page_private($user) {
203 203
     // shown in the private account page
204 204
 }
205 205
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
     array("name" => "Uppercase", "short_name" => "UC", "appids" => array(1, 25)),
283 283
 );
284 284
 
285
-function project_user_credit($user){
285
+function project_user_credit($user) {
286 286
     global $sub_projects;
287 287
     foreach ($sub_projects as $sp) {
288 288
         show_app_credit_user($user, $sp["name"], $sp["appids"]);
Please login to merge, or discard this patch.
all/features/work_and_host_stats/work_and_host_stats.pages_default.inc 2 patches
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  */
6 6
 function work_and_host_stats_default_page_manager_pages() {
7 7
   $page = new stdClass;
8
-  $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
8
+  $page->disabled = false; /* Edit this to true to make a default page disabled initially */
9 9
   $page->api_version = 1;
10 10
   $page->name = 'page_stats';
11 11
   $page->task = 'page';
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
   $page->path = 'community/stats';
15 15
   $page->access = array(
16 16
     'type' => 'none',
17
-    'settings' => NULL,
17
+    'settings' => null,
18 18
   );
19 19
   $page->menu = array(
20 20
     'type' => 'normal',
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
   $page->conf = array();
33 33
   $page->default_handlers = array();
34 34
   $handler = new stdClass;
35
-  $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
35
+  $handler->disabled = false; /* Edit this to true to make a default handler disabled initially */
36 36
   $handler->api_version = 1;
37 37
   $handler->name = 'page_page_stats_panel_context';
38 38
   $handler->task = 'page';
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
   $display->layout_settings = array();
54 54
   $display->panel_settings = array(
55 55
     'style_settings' => array(
56
-      'default' => NULL,
57
-      'middle' => NULL,
56
+      'default' => null,
57
+      'middle' => null,
58 58
     ),
59 59
   );
60 60
   $display->cache = array();
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
     $pane->panel = 'middle';
67 67
     $pane->type = 'views_panes';
68 68
     $pane->subtype = 'boinc_users-panel_pane_1';
69
-    $pane->shown = TRUE;
69
+    $pane->shown = true;
70 70
     $pane->access = array();
71 71
     $pane->configuration = array();
72 72
     $pane->cache = array();
73 73
     $pane->style = array(
74
-      'settings' => NULL,
74
+      'settings' => null,
75 75
     );
76 76
     $pane->css = array(
77 77
       'css_id' => '',
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
     $pane->panel = 'middle';
87 87
     $pane->type = 'views_panes';
88 88
     $pane->subtype = 'boinc_host_list-panel_pane_1';
89
-    $pane->shown = TRUE;
89
+    $pane->shown = true;
90 90
     $pane->access = array();
91 91
     $pane->configuration = array();
92 92
     $pane->cache = array();
93 93
     $pane->style = array(
94
-      'settings' => NULL,
94
+      'settings' => null,
95 95
     );
96 96
     $pane->css = array(
97 97
       'css_id' => '',
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     $pane->panel = 'middle';
107 107
     $pane->type = 'views_panes';
108 108
     $pane->subtype = 'boinc_teams-panel_pane_4';
109
-    $pane->shown = TRUE;
109
+    $pane->shown = true;
110 110
     $pane->access = array();
111 111
     $pane->configuration = array(
112 112
       'link_to_view' => 0,
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     );
120 120
     $pane->cache = array();
121 121
     $pane->style = array(
122
-      'settings' => NULL,
122
+      'settings' => null,
123 123
     );
124 124
     $pane->css = array(
125 125
       'css_id' => '',
Please login to merge, or discard this patch.
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -4,42 +4,42 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_default_page_manager_pages().
5 5
  */
6 6
 function work_and_host_stats_default_page_manager_pages() {
7
-  $page = new stdClass;
8
-  $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
9
-  $page->api_version = 1;
10
-  $page->name = 'page_stats';
11
-  $page->task = 'page';
12
-  $page->admin_title = 'Stats';
13
-  $page->admin_description = '';
14
-  $page->path = 'community/stats';
15
-  $page->access = array(
7
+    $page = new stdClass;
8
+    $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
9
+    $page->api_version = 1;
10
+    $page->name = 'page_stats';
11
+    $page->task = 'page';
12
+    $page->admin_title = 'Stats';
13
+    $page->admin_description = '';
14
+    $page->path = 'community/stats';
15
+    $page->access = array(
16 16
     'type' => 'none',
17 17
     'settings' => NULL,
18
-  );
19
-  $page->menu = array(
18
+    );
19
+    $page->menu = array(
20 20
     'type' => 'normal',
21 21
     'title' => 'Statistics',
22 22
     'name' => 'primary-links',
23 23
     'weight' => '20',
24 24
     'parent' => array(
25
-      'type' => 'none',
26
-      'title' => '',
27
-      'name' => 'navigation',
28
-      'weight' => '0',
25
+        'type' => 'none',
26
+        'title' => '',
27
+        'name' => 'navigation',
28
+        'weight' => '0',
29 29
     ),
30
-  );
31
-  $page->arguments = array();
32
-  $page->conf = array();
33
-  $page->default_handlers = array();
34
-  $handler = new stdClass;
35
-  $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
36
-  $handler->api_version = 1;
37
-  $handler->name = 'page_page_stats_panel_context';
38
-  $handler->task = 'page';
39
-  $handler->subtask = 'page_stats';
40
-  $handler->handler = 'panel_context';
41
-  $handler->weight = 0;
42
-  $handler->conf = array(
30
+    );
31
+    $page->arguments = array();
32
+    $page->conf = array();
33
+    $page->default_handlers = array();
34
+    $handler = new stdClass;
35
+    $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
36
+    $handler->api_version = 1;
37
+    $handler->name = 'page_page_stats_panel_context';
38
+    $handler->task = 'page';
39
+    $handler->subtask = 'page_stats';
40
+    $handler->handler = 'panel_context';
41
+    $handler->weight = 0;
42
+    $handler->conf = array(
43 43
     'title' => 'Panel',
44 44
     'no_blocks' => 0,
45 45
     'pipeline' => 'standard',
@@ -47,22 +47,22 @@  discard block
 block discarded – undo
47 47
     'css' => '',
48 48
     'contexts' => array(),
49 49
     'relationships' => array(),
50
-  );
51
-  $display = new panels_display;
52
-  $display->layout = 'onecol';
53
-  $display->layout_settings = array();
54
-  $display->panel_settings = array(
50
+    );
51
+    $display = new panels_display;
52
+    $display->layout = 'onecol';
53
+    $display->layout_settings = array();
54
+    $display->panel_settings = array(
55 55
     'style_settings' => array(
56
-      'default' => NULL,
57
-      'middle' => NULL,
56
+        'default' => NULL,
57
+        'middle' => NULL,
58 58
     ),
59
-  );
60
-  $display->cache = array();
61
-  $display->title = 'Statistics and Leaderboards';
62
-  $display->storage_type = 'page_manager';
63
-  $display->storage_id = 'page_page_stats_panel_context';
64
-  $display->content = array();
65
-  $display->panels = array();
59
+    );
60
+    $display->cache = array();
61
+    $display->title = 'Statistics and Leaderboards';
62
+    $display->storage_type = 'page_manager';
63
+    $display->storage_id = 'page_page_stats_panel_context';
64
+    $display->content = array();
65
+    $display->panels = array();
66 66
     $pane = new stdClass;
67 67
     $pane->pid = 'new-1';
68 68
     $pane->panel = 'middle';
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
     $pane->configuration = array();
74 74
     $pane->cache = array();
75 75
     $pane->style = array(
76
-      'settings' => NULL,
76
+        'settings' => NULL,
77 77
     );
78 78
     $pane->css = array(
79
-      'css_id' => '',
80
-      'css_class' => 'panel-primary container shadow',
79
+        'css_id' => '',
80
+        'css_class' => 'panel-primary container shadow',
81 81
     );
82 82
     $pane->extras = array();
83 83
     $pane->position = 0;
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
     $pane->configuration = array();
94 94
     $pane->cache = array();
95 95
     $pane->style = array(
96
-      'settings' => NULL,
96
+        'settings' => NULL,
97 97
     );
98 98
     $pane->css = array(
99
-      'css_id' => '',
100
-      'css_class' => 'panel-primary container shadow',
99
+        'css_id' => '',
100
+        'css_class' => 'panel-primary container shadow',
101 101
     );
102 102
     $pane->extras = array();
103 103
     $pane->position = 1;
@@ -111,32 +111,32 @@  discard block
 block discarded – undo
111 111
     $pane->shown = TRUE;
112 112
     $pane->access = array();
113 113
     $pane->configuration = array(
114
-      'link_to_view' => 0,
115
-      'more_link' => 1,
116
-      'use_pager' => 0,
117
-      'pager_id' => '',
118
-      'items_per_page' => '10',
119
-      'override_title' => 0,
120
-      'override_title_text' => '',
114
+        'link_to_view' => 0,
115
+        'more_link' => 1,
116
+        'use_pager' => 0,
117
+        'pager_id' => '',
118
+        'items_per_page' => '10',
119
+        'override_title' => 0,
120
+        'override_title_text' => '',
121 121
     );
122 122
     $pane->cache = array();
123 123
     $pane->style = array(
124
-      'settings' => NULL,
124
+        'settings' => NULL,
125 125
     );
126 126
     $pane->css = array(
127
-      'css_id' => '',
128
-      'css_class' => 'panel-primary container shadow',
127
+        'css_id' => '',
128
+        'css_class' => 'panel-primary container shadow',
129 129
     );
130 130
     $pane->extras = array();
131 131
     $pane->position = 2;
132 132
     $display->content['new-3'] = $pane;
133 133
     $display->panels['middle'][2] = 'new-3';
134
-  $display->hide_title = PANELS_TITLE_FIXED;
135
-  $display->title_pane = '0';
136
-  $handler->conf['display'] = $display;
137
-  $page->default_handlers[$handler->name] = $handler;
138
-  $pages['page_stats'] = $page;
134
+    $display->hide_title = PANELS_TITLE_FIXED;
135
+    $display->title_pane = '0';
136
+    $handler->conf['display'] = $display;
137
+    $page->default_handlers[$handler->name] = $handler;
138
+    $pages['page_stats'] = $page;
139 139
 
140
- return $pages;
140
+    return $pages;
141 141
 
142 142
 }
Please login to merge, or discard this patch.
drupal/sites/all/features/boinc_standard/boinc_standard.panels_default.inc 2 patches
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
   $export = array();
8 8
 
9 9
   $mini = new stdClass;
10
-  $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */
10
+  $mini->disabled = false; /* Edit this to true to make a default mini disabled initially */
11 11
   $mini->api_version = 1;
12 12
   $mini->name = 'dashboard_tables';
13 13
   $mini->category = 'BOINC';
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
   $display->layout_settings = array();
22 22
   $display->panel_settings = array(
23 23
     'style_settings' => array(
24
-      'default' => NULL,
25
-      'left' => NULL,
26
-      'right' => NULL,
27
-      'top' => NULL,
28
-      'bottom' => NULL,
24
+      'default' => null,
25
+      'left' => null,
26
+      'right' => null,
27
+      'top' => null,
28
+      'bottom' => null,
29 29
     ),
30 30
   );
31 31
   $display->cache = array();
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
     $pane->panel = 'left';
38 38
     $pane->type = 'views_panes';
39 39
     $pane->subtype = 'boinc_account_computers-panel_pane_1';
40
-    $pane->shown = TRUE;
40
+    $pane->shown = true;
41 41
     $pane->access = array();
42 42
     $pane->configuration = array();
43 43
     $pane->cache = array();
44 44
     $pane->style = array(
45
-      'settings' => NULL,
45
+      'settings' => null,
46 46
     );
47 47
     $pane->css = array();
48 48
     $pane->extras = array();
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     $pane->panel = 'right';
55 55
     $pane->type = 'panels_mini';
56 56
     $pane->subtype = 'user_project_list';
57
-    $pane->shown = TRUE;
57
+    $pane->shown = true;
58 58
     $pane->access = array();
59 59
     $pane->configuration = array(
60 60
       'override_title' => 0,
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     );
63 63
     $pane->cache = array();
64 64
     $pane->style = array(
65
-      'settings' => NULL,
65
+      'settings' => null,
66 66
     );
67 67
     $pane->css = array();
68 68
     $pane->extras = array();
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
     $pane->panel = 'top';
75 75
     $pane->type = 'views_panes';
76 76
     $pane->subtype = 'boinc_account_stats-panel_pane_1';
77
-    $pane->shown = TRUE;
77
+    $pane->shown = true;
78 78
     $pane->access = array();
79 79
     $pane->configuration = array();
80 80
     $pane->cache = array();
81 81
     $pane->style = array(
82
-      'settings' => NULL,
82
+      'settings' => null,
83 83
     );
84 84
     $pane->css = array();
85 85
     $pane->extras = array();
Please login to merge, or discard this patch.
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -4,36 +4,36 @@  discard block
 block discarded – undo
4 4
  * Implementation of hook_default_panels_mini().
5 5
  */
6 6
 function boinc_standard_default_panels_mini() {
7
-  $export = array();
7
+    $export = array();
8 8
 
9
-  $mini = new stdClass;
10
-  $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */
11
-  $mini->api_version = 1;
12
-  $mini->name = 'dashboard_tables';
13
-  $mini->category = 'BOINC';
14
-  $mini->admin_title = 'Dashboard tables';
15
-  $mini->admin_description = 'Tables of computers and projects for a user';
16
-  $mini->requiredcontexts = array();
17
-  $mini->contexts = array();
18
-  $mini->relationships = array();
19
-  $display = new panels_display;
20
-  $display->layout = 'twocol_stacked';
21
-  $display->layout_settings = array();
22
-  $display->panel_settings = array(
9
+    $mini = new stdClass;
10
+    $mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */
11
+    $mini->api_version = 1;
12
+    $mini->name = 'dashboard_tables';
13
+    $mini->category = 'BOINC';
14
+    $mini->admin_title = 'Dashboard tables';
15
+    $mini->admin_description = 'Tables of computers and projects for a user';
16
+    $mini->requiredcontexts = array();
17
+    $mini->contexts = array();
18
+    $mini->relationships = array();
19
+    $display = new panels_display;
20
+    $display->layout = 'twocol_stacked';
21
+    $display->layout_settings = array();
22
+    $display->panel_settings = array(
23 23
     'style_settings' => array(
24
-      'default' => NULL,
25
-      'left' => NULL,
26
-      'right' => NULL,
27
-      'top' => NULL,
28
-      'bottom' => NULL,
24
+        'default' => NULL,
25
+        'left' => NULL,
26
+        'right' => NULL,
27
+        'top' => NULL,
28
+        'bottom' => NULL,
29 29
     ),
30
-  );
31
-  $display->cache = array();
32
-  $display->title = '';
33
-  $display->storage_type = 'panels_mini';
34
-  $display->storage_id = 'dashboard_tables';
35
-  $display->content = array();
36
-  $display->panels = array();
30
+    );
31
+    $display->cache = array();
32
+    $display->title = '';
33
+    $display->storage_type = 'panels_mini';
34
+    $display->storage_id = 'dashboard_tables';
35
+    $display->content = array();
36
+    $display->panels = array();
37 37
     $pane = new stdClass;
38 38
     $pane->pid = 'new-1';
39 39
     $pane->panel = 'left';
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     $pane->configuration = array();
45 45
     $pane->cache = array();
46 46
     $pane->style = array(
47
-      'settings' => NULL,
47
+        'settings' => NULL,
48 48
     );
49 49
     $pane->css = array();
50 50
     $pane->extras = array();
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     $pane->shown = TRUE;
60 60
     $pane->access = array();
61 61
     $pane->configuration = array(
62
-      'override_title' => 0,
63
-      'override_title_text' => '',
62
+        'override_title' => 0,
63
+        'override_title_text' => '',
64 64
     );
65 65
     $pane->cache = array();
66 66
     $pane->style = array(
67
-      'settings' => NULL,
67
+        'settings' => NULL,
68 68
     );
69 69
     $pane->css = array();
70 70
     $pane->extras = array();
@@ -81,17 +81,17 @@  discard block
 block discarded – undo
81 81
     $pane->configuration = array();
82 82
     $pane->cache = array();
83 83
     $pane->style = array(
84
-      'settings' => NULL,
84
+        'settings' => NULL,
85 85
     );
86 86
     $pane->css = array();
87 87
     $pane->extras = array();
88 88
     $pane->position = 0;
89 89
     $display->content['new-3'] = $pane;
90 90
     $display->panels['top'][0] = 'new-3';
91
-  $display->hide_title = PANELS_TITLE_NONE;
92
-  $display->title_pane = '0';
93
-  $mini->display = $display;
94
-  $export['dashboard_tables'] = $mini;
91
+    $display->hide_title = PANELS_TITLE_NONE;
92
+    $display->title_pane = '0';
93
+    $mini->display = $display;
94
+    $export['dashboard_tables'] = $mini;
95 95
 
96
-  return $export;
96
+    return $export;
97 97
 }
Please login to merge, or discard this patch.