Passed
Pull Request — master (#2712)
by Christian
13:50 queued 06:33
created
html/user/forum_index.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 
74 74
 show_forum_header($user);
75 75
 
76
-if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){
76
+if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) {
77 77
     $categories = BoincCategory::enum("true order by orderID");
78 78
 } else {
79 79
     echo "<p>"
Please login to merge, or discard this patch.
html/user/pm.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -234,7 +234,8 @@  discard block
 block discarded – undo
234 234
 
235 235
     foreach ($users as $username) {
236 236
         $user = explode(" ", $username);
237
-        if (is_numeric($user[0])) { // user ID is given
237
+        if (is_numeric($user[0])) {
238
+// user ID is given
238 239
             $userid = $user[0];
239 240
             $user = BoincUser::lookup_id($userid);
240 241
             if ($user == null) {
@@ -244,7 +245,8 @@  discard block
 block discarded – undo
244 245
             $users = BoincUser::lookup_name($username);
245 246
             if (count($users) == 0) {
246 247
                 pm_form($replyto, $userid, tra("Could not find user with username %1", $username));
247
-            } elseif (count($users) > 1) { // Non-unique username
248
+            } elseif (count($users) > 1) {
249
+// Non-unique username
248 250
                 pm_form($replyto, $userid, tra("%1 is not a unique username; you will have to use user ID", $username));
249 251
             }
250 252
             $user = $users[0];
Please login to merge, or discard this patch.
html/user/forum_edit.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         $now = time();
71 71
         $post->update("signature=$add_signature, content='$content', modified=$now");
72 72
     
73
-        if ($can_edit_title){
73
+        if ($can_edit_title) {
74 74
             $title = trim($title);
75 75
             $title = sanitize_tags($title);
76 76
             $title = BoincDb::escape_string($title);
Please login to merge, or discard this patch.
html/user/forum_moderate_post_action.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 function mod_comment() {
28 28
     $x = "";
29 29
     $reason = post_str('reason', true);
30
-    if ($reason){
30
+    if ($reason) {
31 31
         $x .= "\nModerator comment: $reason
32 32
 ";
33 33
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 // See if "action" is provided - either through post or get
64 64
 if (!post_str('action', true)) {
65
-    if (!get_str('action', true)){
65
+    if (!get_str('action', true)) {
66 66
         error_page(tra("You must specify an action..."));
67 67
     } else {
68 68
         $action = get_str('action');
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
 }
73 73
 
74 74
 $explanation = null;
75
-if ($action=="hide"){
75
+if ($action=="hide") {
76 76
     $result = hide_post($post, $thread, $forum);
77 77
     $action_name = "hidden";
78 78
     $explanation = hide_explanation();
79
-} elseif ($action=="unhide"){
79
+} elseif ($action=="unhide") {
80 80
     $result = unhide_post($post, $thread, $forum);
81 81
     $action_name = "unhidden";
82
-} elseif ($action=="delete"){
82
+} elseif ($action=="delete") {
83 83
     $result = delete_post($post, $thread, $forum);
84 84
     if (!$result) error_page("Can't delete post");
85 85
     page_head("Post deleted");
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     }
97 97
     page_tail();
98 98
     exit;
99
-} elseif ($action=="move"){
99
+} elseif ($action=="move") {
100 100
     $destid = post_int('threadid');
101 101
     $new_thread = BoincThread::lookup_id($destid);
102 102
     if (!$new_thread) error_page("No such thread");
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 ";
118 118
     $explanation .= mod_comment();
119 119
     $action_name = "moved to another thread";
120
-} elseif ($action=="banish_user"){
120
+} elseif ($action=="banish_user") {
121 121
     $auth = false;
122 122
     if (defined("MODERATORS_CAN_BANISH") && $user->prefs->privilege(S_MODERATOR)) {
123 123
         $auth = true;
Please login to merge, or discard this patch.
html/user/forum_thread_status.php 1 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.
html/inc/forum_email.inc 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 // If a user is subscribed to a thread that is replied to,
124 124
 // send them an email notifying them of the reply.
125 125
 //
126
-function send_reply_notification_email($thread, $user){
126
+function send_reply_notification_email($thread, $user) {
127 127
     $title = PROJECT . ": A user has posted to '". $thread->title ."'";
128 128
     $link = secure_url_base() . "forum_thread.php?id=" . $thread->id;
129 129
     $body = "Another " . PROJECT . " user has posted to the thread
Please login to merge, or discard this patch.
html/inc/db_conn.inc 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
                 $port = null;
37 37
             }
38 38
             //if (version_compare(PHP_VERSION, '5.3.0') < 0) {
39
-            if (1) {        // don't use persistent connections for now
39
+            if (1) {
40
+// don't use persistent connections for now
40 41
                 $this->db_conn = @new mysqli($host, $user, $passwd, $name, $port);
41 42
             } else {
42 43
                 $this->db_conn = @new mysqli("p:".$host, $user, $passwd, $name, $port);
Please login to merge, or discard this patch.
html/inc/page_translate.inc 1 patch
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 // Some of this should be merged with translation.inc
21 21
 
22 22
 function get_lang_list() {
23
-    if (isset($_COOKIE['lang'])){
23
+    if (isset($_COOKIE['lang'])) {
24 24
         $language_string = $_COOKIE['lang'].",";
25 25
     } else {
26 26
         $language_string = '';
@@ -33,8 +33,7 @@  discard block
 block discarded – undo
33 33
     $lang_list = array();
34 34
     for ($i=0; $i<sizeof($client_languages); $i++) {
35 35
         if ((strlen($client_languages[$i])>2)
36
-            && (substr($client_languages[$i],2,1)=="_" || substr($client_languages[$i],2,1)=="-"))
37
-        {
36
+            && (substr($client_languages[$i],2,1)=="_" || substr($client_languages[$i],2,1)=="-")) {
38 37
             // If this is defined as primary-secondary, represent it as xx_YY
39 38
             //
40 39
             $language = substr(
Please login to merge, or discard this patch.
html/inc/credit.inc 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@
 block discarded – undo
31 31
 
32 32
         if ((1.0-$weight)>0.000001) {
33 33
             $avg += (1.0-$weight)*($work/$diff_days);
34
-        }
35
-        else {
34
+        } else {
36 35
             $avg += M_LN2*$work*86400/CREDIT_HALF_LIFE;
37 36
         }
38 37
     } else if ($work) {
Please login to merge, or discard this patch.