Passed
Branch master (7a17e1)
by Vitalii
08:27
created
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.
html/user/team_admins.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     ;
59 59
     $admins = BoincTeamAdmin::enum("teamid=$teamid");
60 60
     start_table();
61
-    if (count($admins)==0) {
61
+    if (count($admins) == 0) {
62 62
         row1(tra("There are currently no Team Admins"));
63 63
     } else {
64 64
         row1(tra("Current Team Admins"), 3);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 function add_admin($team) {
98 98
     $email_addr = get_str('email_addr');
99
-    $email_addr =  BoincDb::escape_string($email_addr);
99
+    $email_addr = BoincDb::escape_string($email_addr);
100 100
     $user = BoincUser::lookup("email_addr='$email_addr'");
101 101
     if (!$user) error_page(tra("no such user"));
102 102
     if ($user->teamid != $team->id) error_page(tra("User is not member of team"));
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 require_founder_login($user, $team);
116 116
 
117 117
 $action = get_str('action', true);
118
-switch($action) {
118
+switch ($action) {
119 119
 case 'remove':
120 120
     check_tokens($user->authenticator);
121 121
     remove_admin($team);
Please login to merge, or discard this patch.
html/user/forum_rate.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     $rating = post_int('rating', true);
38 38
     if (!$choice) $choice = get_str('choice', true);
39 39
     
40
-    if ($choice == SOLUTION or $choice=="p") {
40
+    if ($choice == SOLUTION or $choice == "p") {
41 41
         $rating = 1;
42 42
     } else {
43 43
         $rating = -1;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     // Make sure the user has the forum's minimum amount of RAC and total credit
57 57
     // before allowing them to rate a post.
58 58
     //
59
-    if ($user->total_credit<$forum->rate_min_total_credit || $user->expavg_credit<$forum->rate_min_expavg_credit) {
59
+    if ($user->total_credit < $forum->rate_min_total_credit || $user->expavg_credit < $forum->rate_min_expavg_credit) {
60 60
         error_page(tra("You need more average or total credit to rate a post."));
61 61
     }
62 62
     
@@ -91,5 +91,5 @@  discard block
 block discarded – undo
91 91
     exit;
92 92
 }
93 93
 
94
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
94
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
95 95
 ?>
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     $user = get_logged_in_user();
47 47
 
48 48
     if ($choice == null && ($rating == null || $rating > 2 || $rating < -2)) {
49
-        show_result_page(false, NULL, NULL, $choice);
49
+        show_result_page(false, null, null, $choice);
50 50
     }
51 51
 
52 52
     $post = BoincPost::lookup_id($postId);
Please login to merge, or discard this patch.
html/user/team_search.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 // where team includes a field "refcnt".
32 32
 // 
33 33
 function merge_lists($list1, &$list2, $weight) {
34
-    foreach($list1 as $team) {
34
+    foreach ($list1 as $team) {
35 35
         $id = $team->id;
36 36
         if (array_key_exists($id, $list2)) {
37 37
             $list2[$id]->refcnt += $weight;
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         if (defined("SHOW_NONVALIDATED_TEAMS")) {
98 98
             $user = BoincUser::lookup_id($team->userid);
99 99
             echo "<td>";
100
-            echo $user->email_validated?"Yes":"No";
100
+            echo $user->email_validated ? "Yes" : "No";
101 101
             echo "</td>\n";
102 102
         }
103 103
         echo "
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     xml_header();
138 138
     echo "<teams>\n";
139 139
     sort_list($list);
140
-    foreach($list as $team) {
140
+    foreach ($list as $team) {
141 141
         show_team_xml($team);
142 142
     }
143 143
     echo "</teams>\n";
@@ -164,14 +164,14 @@  discard block
 block discarded – undo
164 164
         merge_lists($list2, $list, 3);
165 165
         $tried = true;
166 166
     }
167
-    if (strlen($params->country) && $params->country!='None') {
167
+    if (strlen($params->country) && $params->country != 'None') {
168 168
         $country = BoincDb::escape_string($params->country);
169 169
         $list2 = get_teams("country = '$country'", $params->active);
170 170
         //echo "<br>country matches: ",sizeof($list2);
171 171
         merge_lists($list2, $list, 1);
172 172
         $tried = true;
173 173
     }
174
-    if ($params->type and $params->type>1) {
174
+    if ($params->type and $params->type > 1) {
175 175
         $list2 = get_teams("type=$params->type", $params->active);
176 176
         //echo "<br>type matches: ",sizeof($list2);
177 177
         merge_lists($list2, $list, 2);
Please login to merge, or discard this patch.
html/user/show_coproc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
         echo $x;
93 93
         break;
94 94
     }
95
-    echo "</td><td align=right>".format_credit_large($y->credit),"</td><td align=right>$y->nresults</td></tr>\n";
95
+    echo "</td><td align=right>".format_credit_large($y->credit), "</td><td align=right>$y->nresults</td></tr>\n";
96 96
 }
97 97
 
98 98
 $mode = get_str('mode', true);
Please login to merge, or discard this patch.
html/user/account_finish_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 $auth = post_str("auth");
24 24
 $name = post_str("name");
25 25
 
26
-if (strlen($name)==0) {
26
+if (strlen($name) == 0) {
27 27
     error_page(tra("You must supply a name for your account"));
28 28
 }
29 29
 if ($name != sanitize_tags($name)) {
Please login to merge, or discard this patch.