Passed
Branch master (7a17e1)
by Vitalii
08:27
created
html/user/forum_thread_vote.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
 $thread = BoincThread::lookup_id($threadid);
30 30
 $logged_in_user = get_logged_in_user();
31 31
 
32
-$posts = get_thread_posts($threadid, 0,true);
32
+$posts = get_thread_posts($threadid, 0, true);
33 33
 header("Location: forum_rate.php?choice=p&post=".$posts[0]->id);
34 34
 ?>
Please login to merge, or discard this patch.
html/user/forum_rss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 $ndays = get_int('ndays', true);
59 59
 $threads_only = get_str('threads_only', true);
60 60
 
61
-if(!$ndays || $ndays < 1) {
61
+if (!$ndays || $ndays < 1) {
62 62
     $ndays = 30;
63 63
 }
64 64
 
Please login to merge, or discard this patch.
html/user/top_users.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 if (!$users_per_page) {
29 29
     $users_per_page = 20;
30 30
 }
31
-define ('ITEM_LIMIT', 10000);
31
+define('ITEM_LIMIT', 10000);
32 32
 
33 33
 function get_top_participants($offset, $sort_by) {
34 34
     global $users_per_page;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         <td align=right>", format_credit_large($user->expavg_credit), "</td>
68 68
         <td align=right>", format_credit_large($user->total_credit), "</td>
69 69
         <td>", $user->country, "</td>
70
-        <td>", time_str($user->create_time),"</td>
70
+        <td>", time_str($user->create_time), "</td>
71 71
         </tr>
72 72
     ";
73 73
 }
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
 }
83 83
 
84 84
 $offset = get_int("offset", true);
85
-if (!$offset) $offset=0;
86
-if ($offset % $users_per_page) $offset = 0;
85
+if (!$offset) $offset = 0;
86
+if ($offset%$users_per_page) $offset = 0;
87 87
 
88 88
 if ($offset < ITEM_LIMIT) {
89 89
     $cache_args = "sort_by=$sort_by&offset=$offset";
90
-    $cacheddata = get_cached_data(TOP_PAGES_TTL,$cache_args);
90
+    $cacheddata = get_cached_data(TOP_PAGES_TTL, $cache_args);
91 91
 
92 92
     // Do we have the data in cache?
93 93
     //
94
-    if ($cacheddata){
94
+    if ($cacheddata) {
95 95
         $data = unserialize($cacheddata); // use the cached data
96 96
     } else {
97 97
         //if not do queries etc to generate new data
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
         //save data in cache
101 101
         //
102
-        set_cached_data(TOP_PAGES_TTL, serialize($data),$cache_args);
102
+        set_cached_data(TOP_PAGES_TTL, serialize($data), $cache_args);
103 103
     }
104 104
 } else {
105 105
     error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT));
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Previous %1", $users_per_page)."</a> &middot; ";
123 123
 
124 124
 }
125
-if ($n==$users_per_page){ //If we aren't on the last page
125
+if ($n == $users_per_page) { //If we aren't on the last page
126 126
     $new_offset = $offset + $users_per_page;
127 127
     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Next %1", $users_per_page)."</a>";
128 128
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     // Do we have the data in cache?
93 93
     //
94
-    if ($cacheddata){
94
+    if ($cacheddata) {
95 95
         $data = unserialize($cacheddata); // use the cached data
96 96
     } else {
97 97
         //if not do queries etc to generate new data
@@ -122,7 +122,8 @@  discard block
 block discarded – undo
122 122
     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Previous %1", $users_per_page)."</a> &middot; ";
123 123
 
124 124
 }
125
-if ($n==$users_per_page){ //If we aren't on the last page
125
+if ($n==$users_per_page) {
126
+//If we aren't on the last page
126 127
     $new_offset = $offset + $users_per_page;
127 128
     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Next %1", $users_per_page)."</a>";
128 129
 }
Please login to merge, or discard this patch.
html/user/team_members.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
26 26
 
27 27
 if (isset($_GET["sort_by"])) {
28 28
     $sort_by = $_GET["sort_by"];
29
-    $sort_by = strip_tags($sort_by);    // remove XSS nonsense
29
+    $sort_by = strip_tags($sort_by); // remove XSS nonsense
30 30
 } else {
31 31
     $sort_by = "expavg_credit";
32 32
 }
33 33
 
34 34
 $offset = get_int("offset", true);
35
-if (!$offset) $offset=0;
35
+if (!$offset) $offset = 0;
36 36
 
37 37
 if ($offset > 1000) {
38 38
     error_page(tra("Limit exceeded:  Can only display the first 1000 members."));
Please login to merge, or discard this patch.
html/user/manage_app.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     table_header("platform", "plan class", "version#", "deprecated");
50 50
     foreach ($avs as $av) {
51 51
         $platform = BoincPlatform::lookup_id($av->platformid);
52
-        $c = $av->deprecated?"checked":"";
52
+        $c = $av->deprecated ? "checked" : "";
53 53
         echo "
54 54
             <tr>
55 55
             <td>$platform->name</td>
Please login to merge, or discard this patch.
html/user/profile_search_action.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $search_string = sanitize_tags($search_string);
33 33
 $search_string = BoincDb::escape_string($search_string);
34 34
 $offset = get_int('offset', true);
35
-if (!$offset) $offset=0;
35
+if (!$offset) $offset = 0;
36 36
 $count = 10;
37 37
 
38 38
 page_head(tra("Profiles containing '%1'", $search_string));
@@ -46,17 +46,17 @@  discard block
 block discarded – undo
46 46
     <th>".tra("Recent credit")."</th></tr>
47 47
 ";
48 48
 $n = 0;
49
-foreach($profiles as $profile) {
50
-    show_profile_link2($profile, $n+$offset+1);
49
+foreach ($profiles as $profile) {
50
+    show_profile_link2($profile, $n + $offset + 1);
51 51
     $n += 1;
52 52
 }
53 53
 end_table();
54 54
 
55
-if ($offset==0 && $n==0) {
55
+if ($offset == 0 && $n == 0) {
56 56
     echo tra("No profiles found containing '%1'", $search_string);
57 57
 }
58 58
 
59
-if ($n==$count) {
59
+if ($n == $count) {
60 60
     $s = urlencode($search_string);
61 61
     $offset += $count;
62 62
     echo "
Please login to merge, or discard this patch.
html/user/friend.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     $friend = BoincFriend::lookup($srcid, $user->id);
139 139
     if (!$friend) error_page("Request not found");
140 140
     page_head(tra("Friend request"));
141
-	echo time_str($friend->create_time)."<p>\n";
141
+    echo time_str($friend->create_time)."<p>\n";
142 142
     $x = user_links($srcuser, BADGE_HEIGHT_MEDIUM);
143 143
     echo tra("%1 has requested friendship with you.", $x);
144 144
     if (strlen($friend->message)) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         if ($notify) {
39 39
             page_head(tra("Request pending"));
40 40
             $t = date_str($friend->create_time);
41
-            echo tra("You requested friendship with %1 on %2.", $destuser->name,$t) . "
41
+            echo tra("You requested friendship with %1 on %2.", $destuser->name, $t)."
42 42
                 <p>" .
43 43
                 tra("This request is still pending confirmation.");
44 44
             page_tail();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 function check_ignoring($srcuser, $destuser) {
52 52
     BoincForumPrefs::lookup($destuser);
53 53
     if (is_ignoring($destuser, $srcuser)) {
54
-        error_page(tra("%1 is not accepting friendship requests from you",$destuser->name));
54
+        error_page(tra("%1 is not accepting friendship requests from you", $destuser->name));
55 55
     }
56 56
 }
57 57
 
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
     echo "
73 73
         <form method=post action=friend.php>
74 74
         <input type=hidden name=userid value=$destid>
75
-        <input type=hidden name=action value=add_confirm>" .
75
+        <input type=hidden name=action value=add_confirm>".
76 76
         tra("You have asked to add %1 as a friend. We will notify %1 and will ask him/her to confirm that you are friends.",
77
-        "<b>".$destuser->name."</b>") ."
77
+        "<b>".$destuser->name."</b>")."
78 78
         <p>" .
79
-        tra("Add an optional message here:") ."
79
+        tra("Add an optional message here:")."
80 80
         <br>
81 81
         ".textarea_with_counter("message", 250, "")."
82 82
         <p>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         send_friend_request_email($user, $destuser, $msg);
116 116
     }
117 117
     page_head(tra("Friend request sent"));
118
-    echo tra("We have notified %1 of your request.","<b>".$destuser->name."</b>");
118
+    echo tra("We have notified %1 of your request.", "<b>".$destuser->name."</b>");
119 119
     page_tail();
120 120
 }
121 121
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     }
187 187
 
188 188
     page_head(tra("Friendship confirmed"));
189
-    echo tra("Your friendship with %1 has been confirmed.","<b>" . $srcuser->name ."</b>");
189
+    echo tra("Your friendship with %1 has been confirmed.", "<b>".$srcuser->name."</b>");
190 190
     page_tail();
191 191
 }
192 192
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $notify->delete();
206 206
     }
207 207
     page_head(tra("Friendship declined"));
208
-    echo tra("You have declined friendship with %1","<b>".$srcuser->name."</b>");
208
+    echo tra("You have declined friendship with %1", "<b>".$srcuser->name."</b>");
209 209
     page_tail();
210 210
 }
211 211
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         echo tra("Notification not found");
224 224
     }
225 225
     page_head(tra("Friend confirmed"));
226
-    echo tra("You are now friends with %1.",$destuser->name);
226
+    echo tra("You are now friends with %1.", $destuser->name);
227 227
     page_tail();
228 228
 }
229 229
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     echo
236 236
         tra("Are you sure you want to cancel your friendship with %1?",
237 237
             $destuser->name
238
-        ) ."<p>\n"
238
+        )."<p>\n"
239 239
     ;
240 240
     show_button("friend.php?action=cancel&userid=$destid", tra("Yes"), tra("Cancel friendship"));
241 241
     show_button(USER_HOME, tra("No"), tra("Stay friends"));
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     if (!$destuser) error_page("No such user");
250 250
     BoincFriend::delete($user->id, $destid);
251 251
     page_head(tra("Friendship cancelled"));
252
-    echo tra("Your friendship with %1 has been cancelled.",$destuser->name);
252
+    echo tra("Your friendship with %1 has been cancelled.", $destuser->name);
253 253
     page_tail();
254 254
 }
255 255
 
Please login to merge, or discard this patch.
html/user/team_remove_inactive_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 page_head(tra("Removing users from %1", $team->name));
34 34
 $ndel = 0;
35
-for ($i=0; $i<$_POST["ninactive_users"]; $i++) {
35
+for ($i = 0; $i < $_POST["ninactive_users"]; $i++) {
36 36
     $userid = post_int("remove_$i", true);
37 37
     if (!$userid) continue;
38 38
     $user = BoincUser::lookup_id($userid);
Please login to merge, or discard this patch.
html/user/forum_thread_status.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@
 block discarded – undo
35 35
 }
36 36
 
37 37
 $owner = BoincUser::lookup_id($thread->owner);
38
-if ($logged_in_user->id == $owner->id){ 
38
+if ($logged_in_user->id == $owner->id) { 
39 39
     $action = get_str("action");
40 40
     if ($action == "set") {
41 41
         $ret = $thread->update("status=1");
42 42
     } else {
43 43
         $ret = $thread->update("status=0");
44 44
     }
45
-    if (!$ret){
45
+    if (!$ret) {
46 46
         error_page("Could not update the status of the thread: ".$thread->id);
47 47
     }
48 48
 } else {
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@
 block discarded – undo
35 35
 }
36 36
 
37 37
 $owner = BoincUser::lookup_id($thread->owner);
38
-if ($logged_in_user->id == $owner->id){ 
38
+if ($logged_in_user->id == $owner->id) {
39 39
     $action = get_str("action");
40 40
     if ($action == "set") {
41 41
         $ret = $thread->update("status=1");
42 42
     } else {
43 43
         $ret = $thread->update("status=0");
44 44
     }
45
-    if (!$ret){
45
+    if (!$ret) {
46 46
         error_page("Could not update the status of the thread: ".$thread->id);
47 47
     }
48 48
 } else {
Please login to merge, or discard this patch.