Passed
Pull Request — master (#5727)
by Vitalii
15:05 queued 06:01
created
html/inc/pm.inc 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     return $x;
50 50
 }
51 51
 
52
-function pm_team_form($user, $teamid, $error=null) {
52
+function pm_team_form($user, $teamid, $error = null) {
53 53
     global $bbcode_html, $bbcode_js;
54 54
     $team = BoincTeam::lookup_id($teamid);
55 55
     if (!$team) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         error_page("not admin");
60 60
     }
61 61
 
62
-    page_head(tra("Send message to team"),'','','', $bbcode_js);
62
+    page_head(tra("Send message to team"), '', '', '', $bbcode_js);
63 63
 
64 64
     $subject = post_str("subject", true);
65 65
     $content = post_str("content", true);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 function pm_form_page($replyto, $userid, $error = null) {
112 112
     global $bbcode_html, $bbcode_js;
113 113
     global $g_logged_in_user;
114
-    page_head(tra("Send private message"),'','','', $bbcode_js);
114
+    page_head(tra("Send private message"), '', '', '', $bbcode_js);
115 115
 
116 116
     if (post_str("preview", true) == tra("Preview")) {
117 117
         $content = post_str("content", true);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         if (!$user) {
136 136
             error_page("Sender no longer exists");
137 137
         }
138
-        $writeto = UNIQUE_USER_NAME?$user->name:$userid." (".$user->name.")";
138
+        $writeto = UNIQUE_USER_NAME ? $user->name : $userid." (".$user->name.")";
139 139
         $subject = $message->subject;
140 140
         if (substr($subject, 0, 3) != "re:") {
141 141
             $subject = "re: ".$subject;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         if (!$user) {
146 146
             error_page("Sender no longer exists");
147 147
         }
148
-        $writeto = UNIQUE_USER_NAME?$user->name:$userid." (".$user->name.")";
148
+        $writeto = UNIQUE_USER_NAME ? $user->name : $userid." (".$user->name.")";
149 149
     } else {
150 150
         $writeto = sanitize_tags(post_str("to", true));
151 151
         $subject = post_str("subject", true);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 function send_pm_notification_email(
201 201
     $logged_in_user, $to_user, $subject, $content
202 202
 ) {
203
-    $message  = "
203
+    $message = "
204 204
 You have received a new private message at ".PROJECT.".
205 205
 
206 206
 From: $logged_in_user->name (ID $logged_in_user->id)
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     $pm = BoincPrivateMessage::lookup_id($notify->opaque);
231 231
     $from_user = BoincUser::lookup_id($pm->senderid);
232 232
     if (!$pm || !$from_user) return null;
233
-    return "<a href=pm.php>".tra("Private message%1 from %2, subject:" , "</a>", $from_user->name )." $pm->subject";
233
+    return "<a href=pm.php>".tra("Private message%1 from %2, subject:", "</a>", $from_user->name)." $pm->subject";
234 234
 }
235 235
 
236 236
 function pm_send_msg($from_user, $to_user, $subject, $content, $send_email) {
@@ -294,11 +294,11 @@  discard block
 block discarded – undo
294 294
 
295 295
 function pm_email_remind($user) {
296 296
     if (!$user->prefs->pm_notification) {
297
-        return "<br><small>" .
297
+        return "<br><small>".
298 298
             tra(
299 299
                 "For email notification, %1 edit community prefs %2",
300 300
                 '<a href="edit_forum_preferences_form.php">', '</a>'
301
-            ) .
301
+            ).
302 302
             "</small>"
303 303
         ;
304 304
     }
@@ -324,5 +324,5 @@  discard block
 block discarded – undo
324 324
     }
325 325
 }
326 326
 
327
-$cvs_version_tracker[]="\$Id: pm.inc 14019 2007-11-01 23:04:39Z davea $";
327
+$cvs_version_tracker[] = "\$Id: pm.inc 14019 2007-11-01 23:04:39Z davea $";
328 328
 ?>
Please login to merge, or discard this patch.
html/user/forum_forum.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 require_once('../inc/forum.inc');
24 24
 require_once('../inc/pm.inc');
25 25
 
26
-function forum_page($forum, $user, $msg=null) {
26
+function forum_page($forum, $user, $msg = null) {
27 27
     global $forum_sort_styles;
28 28
     $sort_style = get_int("sort", true);
29 29
     $start = get_int("start", true);
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 
47 47
     if (!$sort_style) {
48 48
         // get the sort style either from the logged in user or a cookie
49
-        if ($user){
49
+        if ($user) {
50 50
             $sort_style = $user->prefs->forum_sorting;
51 51
         } else {
52 52
             list($sort_style, $thread_style) = parse_forum_cookie();
53 53
         }
54 54
     } else {
55 55
         // set the sort style
56
-        if ($user){
56
+        if ($user) {
57 57
             $user->prefs->forum_sorting = $sort_style;
58 58
             $user->prefs->update("forum_sorting=$sort_style");
59 59
         } else {
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         echo "<td><a href=\"forum_thread.php?id=$thread->id\">$title</a><br></td>";
243 243
 
244 244
         echo '
245
-            <td>'.($thread->replies+1).'</td>
245
+            <td>'.($thread->replies + 1).'</td>
246 246
             <td>'.user_links($owner, BADGE_HEIGHT_SMALL).'</td>
247 247
             <td>'.$thread->views.'</td>
248 248
             <td>'.time_diff_str($thread->timestamp, time()).'</td>
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         flush();
252 252
     }
253 253
     end_table();
254
-    echo "<br>$page_nav";    // show page links
254
+    echo "<br>$page_nav"; // show page links
255 255
 }
256 256
 
257 257
 $id = get_int("id");
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@
 block discarded – undo
46 46
 
47 47
     if (!$sort_style) {
48 48
         // get the sort style either from the logged in user or a cookie
49
-        if ($user){
49
+        if ($user) {
50 50
             $sort_style = $user->prefs->forum_sorting;
51 51
         } else {
52 52
             list($sort_style, $thread_style) = parse_forum_cookie();
53 53
         }
54 54
     } else {
55 55
         // set the sort style
56
-        if ($user){
56
+        if ($user) {
57 57
             $user->prefs->forum_sorting = $sort_style;
58 58
             $user->prefs->update("forum_sorting=$sort_style");
59 59
         } else {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         }
75 75
         if ($msg) echo "<p>$msg</p>\n";
76 76
         show_forum_header($user);
77
-        show_forum_title($category, $forum, NULL);
77
+        show_forum_title($category, $forum, null);
78 78
         break;
79 79
     case 1:
80 80
         $team = BoincTeam::lookup_id($forum->category);
Please login to merge, or discard this patch.
html/ops/delete_user.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 die("Delete this line first\n");
29 29
 
30 30
 if (is_numeric($argv[1])) {
31
-    $user = BoincUser::lookup_id((int) $argv[1]);
31
+    $user = BoincUser::lookup_id((int)$argv[1]);
32 32
     if (!$user) die("no such user\n");
33 33
     $retval = delete_account($user);
34 34
     if ($retval) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         if ($retval) {
44 44
             echo "Failed to delete user: $retval\n";
45 45
         } else {
46
-            echo "User $user->id deleted\n";
46
+            echo "user $user->id deleted\n";
47 47
         }
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
html/inc/email.inc 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 // send an email, using PHPMailer or not.
28 28
 //
29
-function send_email($user, $subject, $body, $body_html=null, $email_addr=null) {
29
+function send_email($user, $subject, $body, $body_html = null, $email_addr = null) {
30 30
     if (!$email_addr) {
31 31
         $email_addr = $user->email_addr;
32 32
     }
@@ -69,17 +69,17 @@  discard block
 block discarded – undo
69 69
             return true;
70 70
         }
71 71
     } else {
72
-        $headers ="";
72
+        $headers = "";
73 73
         if (defined('EMAIL_FROM') && defined('EMAIL_FROM_NAME')) {
74 74
             $headers = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM.">";
75 75
         } else if (defined('EMAIL_FROM')) {
76
-            $headers = "From: ". EMAIL_FROM;
76
+            $headers = "From: ".EMAIL_FROM;
77 77
         }
78 78
         if ($body_html) {
79 79
             $body = "<html><body>\n";
80 80
             $body .= $body_html;
81 81
             $body .= "\n</body></html>\n";
82
-            $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
82
+            $headers .= 'Content-type: text/html; charset=UTF-8'."\r\n";
83 83
         }
84 84
         return mail($email_addr, $subject, $body, $headers);
85 85
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     // otherwise check both IP and email
161 161
     if ($ip && filter_var(
162 162
         $ip, FILTER_VALIDATE_IP,
163
-        FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE
163
+        FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE
164 164
     )) {
165 165
         $x = @file_get_contents("https://www.stopforumspam.com/api?ip=".$ip."&email=".$addr);
166 166
     } else {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     return md5($key.'oogabooga');
206 206
 }
207 207
 
208
-function opt_out_url($user, $page="opt_out.php") {
208
+function opt_out_url($user, $page = "opt_out.php") {
209 209
     return sprintf("%s%s?code=%s&userid=%d",
210 210
         secure_url_base(),
211 211
         $page,
Please login to merge, or discard this patch.