Passed
Pull Request — master (#5472)
by David
13:21 queued 04:01
created
html/user/prefs_remove.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $venue = get_str("venue");
30 30
 $confirmed = get_str("confirmed", true);
31 31
 $columns = get_int("cols", true);
32
-$c = $columns?"&cols=$columns":"";
32
+$c = $columns ? "&cols=$columns" : "";
33 33
 
34 34
 if ($confirmed) {
35 35
     if ($subset == "global") {
@@ -56,5 +56,5 @@  discard block
 block discarded – undo
56 56
     page_tail();
57 57
 }
58 58
 
59
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
59
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
60 60
 ?>
Please login to merge, or discard this patch.
html/user/forum_banishment_vote_action.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 // See if "action" is provided - either through post or get
39 39
 if (!post_str('action', true)) {
40 40
     if (!get_str('action', true)){
41
-	    error_page(tra("You must specify an action..."));
41
+        error_page(tra("You must specify an action..."));
42 42
     } else {
43 43
         $action = get_str('action');
44 44
     }
Please login to merge, or discard this patch.
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@
 block discarded – undo
55 55
 
56 56
 // TODO: create a function for this in forum_banishment_vote.inc to make it more flexible
57 57
 switch (post_int("category", true)) {
58
-    case 1:
59
-        $mod_category = tra("Obscene");
60
-    case 2:
61
-        $mod_category = tra("Flame/Hate mail");
62
-    case 3:
63
-        $mod_category = tra("User Request");
64
-    default:
65
-        $mod_category = tra("Other");
58
+case 1:
59
+    $mod_category = tra("Obscene");
60
+case 2:
61
+    $mod_category = tra("Flame/Hate mail");
62
+case 3:
63
+    $mod_category = tra("User Request");
64
+default:
65
+    $mod_category = tra("Other");
66 66
 }
67 67
 
68 68
 if (post_str('reason', true)){
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 // See if "action" is provided - either through post or get
39 39
 if (!post_str('action', true)) {
40
-    if (!get_str('action', true)){
40
+    if (!get_str('action', true)) {
41 41
 	    error_page(tra("You must specify an action..."));
42 42
     } else {
43 43
         $action = get_str('action');
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 }
48 48
 
49 49
 $userid = post_int('userid');
50
-$user=BoincUser::lookup_id($userid);
50
+$user = BoincUser::lookup_id($userid);
51 51
 
52
-if ($action!="start"){
52
+if ($action != "start") {
53 53
     error_page("Unknown action");
54 54
 }
55 55
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
         $mod_category = tra("Other");
66 66
 }
67 67
 
68
-if (post_str('reason', true)){
69
-    start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason"));
68
+if (post_str('reason', true)) {
69
+    start_vote($config, $logged_in_user, $user, $mod_category, post_str("reason"));
70 70
 } else {
71
-    start_vote($config,$logged_in_user,$user, $mod_category,"None given");
71
+    start_vote($config, $logged_in_user, $user, $mod_category, "None given");
72 72
 }
73 73
 
74
-$cvs_version_tracker[]="\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis $";  //Generated automatically - do not edit
74
+$cvs_version_tracker[] = "\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis $"; //Generated automatically - do not edit
75 75
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 // See if "action" is provided - either through post or get
39 39
 if (!post_str('action', true)) {
40
-    if (!get_str('action', true)){
40
+    if (!get_str('action', true)) {
41 41
 	    error_page(tra("You must specify an action..."));
42 42
     } else {
43 43
         $action = get_str('action');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 $userid = post_int('userid');
50 50
 $user=BoincUser::lookup_id($userid);
51 51
 
52
-if ($action!="start"){
52
+if ($action!="start") {
53 53
     error_page("Unknown action");
54 54
 }
55 55
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $mod_category = tra("Other");
66 66
 }
67 67
 
68
-if (post_str('reason', true)){
68
+if (post_str('reason', true)) {
69 69
     start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason"));
70 70
 } else {
71 71
     start_vote($config,$logged_in_user,$user, $mod_category,"None given");
Please login to merge, or discard this patch.
html/user/forum_user_posts.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
         if ($forum->parent_type == 1) {
90 90
             // post to team msg board
91 91
             if ($forum->category == $teamid) {
92
-				if ($thread->hidden && !$show_team_hidden) {
93
-					continue;
94
-				}
92
+                if ($thread->hidden && !$show_team_hidden) {
93
+                    continue;
94
+                }
95 95
                 if ($post->hidden && !$show_team_hidden) {
96 96
                     continue;
97 97
                 }
@@ -99,18 +99,18 @@  discard block
 block discarded – undo
99 99
                 continue;
100 100
             }
101 101
         } else {
102
-			if ($thread->hidden && !$show_hidden) {
103
-				continue;
104
-			}
102
+            if ($thread->hidden && !$show_hidden) {
103
+                continue;
104
+            }
105 105
             if ($post->hidden && !$show_hidden) {
106 106
                 continue;
107 107
             }
108 108
         }
109 109
     }
110
-	if ($n == $offset + $items_per_page) {
111
-		$show_next = true;
112
-		break;
113
-	}
110
+    if ($n == $offset + $items_per_page) {
111
+        $show_next = true;
112
+        break;
113
+    }
114 114
     if ($n >= $offset) {
115 115
         show_post_and_context($post, $thread, $forum, $options, $n+1);
116 116
     }
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 echo "</table><br><br>\n";
120 120
 
121 121
 if ($offset) {
122
-	$x = $offset - $items_per_page;
122
+    $x = $offset - $items_per_page;
123 123
     echo "<a href=forum_user_posts.php?userid=$userid&offset=$x>
124 124
 		<b>".tra("Previous %1", $items_per_page)."</b>
125 125
 		</a>
126 126
     ";
127
-	if ($show_next) echo " &middot; ";
127
+    if ($show_next) echo " &middot; ";
128 128
 }
129 129
 
130 130
 if ($show_next) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 $userid = get_int("userid");
29 29
 $offset = get_int("offset", true);
30
-if (!$offset) $offset=0;
30
+if (!$offset) $offset = 0;
31 31
 $items_per_page = 20;
32 32
 
33 33
 $user = BoincUser::lookup_id($userid);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		break;
113 113
 	}
114 114
     if ($n >= $offset) {
115
-        show_post_and_context($post, $thread, $forum, $options, $n+1);
115
+        show_post_and_context($post, $thread, $forum, $options, $n + 1);
116 116
     }
117 117
     $n++;
118 118
 }
Please login to merge, or discard this patch.
html/user/team_remove_inactive_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
 $users = BoincUser::enum("teamid=$team->id");
50 50
 $ninactive_users = 0;
51
-foreach($users as $user) {
51
+foreach ($users as $user) {
52 52
     if ($user->id == $logged_in_user->id) continue;
53 53
     if ($user->id == $team->userid) continue;
54 54
     $user_total_credit = format_credit($user->total_credit);
Please login to merge, or discard this patch.
html/user/cpu_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     row_array(
108 108
         array(
109 109
             "Total",
110
-            number_format($total_nhosts, 0). " computers",
110
+            number_format($total_nhosts, 0)." computers",
111 111
             "",
112 112
             "",
113 113
             number_format($total_gflops/1e3, 2)." TeraFLOPS"
Please login to merge, or discard this patch.
html/user/profile_rate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     rowify(tra("Your vote to reject this profile has been recorded."));
46 46
 }
47 47
 end_table();
48
-echo "<br><a href=\"view_profile.php?userid=", $userid ,"\">" . tra("Return to profile.") . "</a>";
48
+echo "<br><a href=\"view_profile.php?userid=", $userid, "\">".tra("Return to profile.")."</a>";
49 49
 
50 50
 page_tail();
51 51
 
Please login to merge, or discard this patch.
html/user/android_tasks.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     $n1 = $x[1] + $x[3];
27 27
     $n2 = $y[1] + $y[3];
28 28
     if ($n1 == $n2) return 0;
29
-    return ($n1 < $n2)?1:-1;
29
+    return ($n1 < $n2) ? 1 : -1;
30 30
 }
31 31
 
32 32
 function get_models() {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             $m[$r->outcome]++;
45 45
             $models[$name_uc] = $m;
46 46
         } else {
47
-            $m = array(0,0,0,0,0,0,0,0);
47
+            $m = array(0, 0, 0, 0, 0, 0, 0, 0);
48 48
             $m[$r->outcome]++;
49 49
             $models[$name_uc] = $m;
50 50
         }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $name = $name[0];
60 60
         if (array_key_exists($name, $vendors)) {
61 61
             $v = $vendors[$name];
62
-            for ($i=0; $i<8; $i++) {
62
+            for ($i = 0; $i < 8; $i++) {
63 63
                 $v[$i] += $m[$i];
64 64
             }
65 65
             $vendors[$name] = $v;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         "Vendor<br><p class=\"text-muted\">click for models</p>",
101 101
         "Success", "Failure", "Success rate"
102 102
     );
103
-    $y = array(0,0,0,0,0,0,0,0);
103
+    $y = array(0, 0, 0, 0, 0, 0, 0, 0);
104 104
     foreach ($vendors as $name=>$x) {
105 105
         if (!$name) {
106 106
             $name = "not reported by client";
Please login to merge, or discard this patch.
html/user/forum_forum.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 
49 49
 if (!$sort_style) {
50 50
     // get the sort style either from the logged in user or a cookie
51
-    if ($user){
51
+    if ($user) {
52 52
         $sort_style = $user->prefs->forum_sorting;
53 53
     } else {
54 54
         list($sort_style, $thread_style) = parse_forum_cookie();
55 55
     }
56 56
 } else {
57 57
     // set the sort style
58
-    if ($user){
58
+    if ($user) {
59 59
         $user->prefs->forum_sorting = $sort_style;
60 60
         $user->prefs->update("forum_sorting=$sort_style");
61 61
     } else {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         echo "<td><a href=\"forum_thread.php?id=$thread->id\">$title</a><br></td>";
220 220
 
221 221
         echo '
222
-            <td>'.($thread->replies+1).'</td>
222
+            <td>'.($thread->replies + 1).'</td>
223 223
             <td>'.user_links($owner, BADGE_HEIGHT_SMALL).'</td>
224 224
             <td>'.$thread->views.'</td>
225 225
             <td>'.time_diff_str($thread->timestamp, time()).'</td>
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         flush();
229 229
     }
230 230
     end_table();
231
-    echo "<br>$page_nav";    // show page links
231
+    echo "<br>$page_nav"; // show page links
232 232
 }
233 233
 
234 234
 ?>
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@
 block discarded – undo
48 48
 
49 49
 if (!$sort_style) {
50 50
     // get the sort style either from the logged in user or a cookie
51
-    if ($user){
51
+    if ($user) {
52 52
         $sort_style = $user->prefs->forum_sorting;
53 53
     } else {
54 54
         list($sort_style, $thread_style) = parse_forum_cookie();
55 55
     }
56 56
 } else {
57 57
     // set the sort style
58
-    if ($user){
58
+    if ($user) {
59 59
         $user->prefs->forum_sorting = $sort_style;
60 60
         $user->prefs->update("forum_sorting=$sort_style");
61 61
     } else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         page_head(tra("Message boards").' : '.$forum->title);
77 77
     }
78 78
     show_forum_header($user);
79
-    show_forum_title($category, $forum, NULL);
79
+    show_forum_title($category, $forum, null);
80 80
     break;
81 81
 case 1:
82 82
     $team = BoincTeam::lookup_id($forum->category);
Please login to merge, or discard this patch.
html/user/language_select.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
 }
34 34
 
35 35
 $set_lang = get_str("set_lang", true);
36
-if ($set_lang){
37
-    if (!in_array($set_lang, $languages) && $set_lang!="auto"){
36
+if ($set_lang) {
37
+    if (!in_array($set_lang, $languages) && $set_lang != "auto") {
38 38
         error_page("Language not supported");
39 39
     } else {
40 40
         send_cookie('lang', $set_lang, true);
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
 }
34 34
 
35 35
 $set_lang = get_str("set_lang", true);
36
-if ($set_lang){
37
-    if (!in_array($set_lang, $languages) && $set_lang!="auto"){
36
+if ($set_lang) {
37
+    if (!in_array($set_lang, $languages) && $set_lang!="auto") {
38 38
         error_page("Language not supported");
39 39
     } else {
40 40
         send_cookie('lang', $set_lang, true);
Please login to merge, or discard this patch.