Passed
Push — master ( f28c5c...f5359d )
by Kevin
01:04 queued 24s
created
html/inc/notify.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         return;
47 47
     }
48 48
 
49
-    $news_date=gmdate('D, d M Y H:i:s',$notify->create_time) . ' GMT';
49
+    $news_date = gmdate('D, d M Y H:i:s', $notify->create_time).' GMT';
50 50
     echo "<item>
51 51
         <title><![CDATA[$title]]></title>
52 52
         <guid>".url_base()."_notify_$notify->id</guid>
Please login to merge, or discard this patch.
html/inc/forum_email.inc 4 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     $link = secure_url_base() . "forum_thread.php?id=" . $thread->id;
129 129
     $body = "Another " . PROJECT . " user has posted to the thread
130 130
 \"" . $thread->title . "\".\n"
131
-           ."To view the updated thread, visit:\n$link
131
+            ."To view the updated thread, visit:\n$link
132 132
 
133 133
 --------------------------
134 134
 To change email preferences, visit:
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 //////////////////// a user clicks the red "x" to report a post ///////////
142 142
 //
143 143
 function send_report_post_email($user, $forum, $thread,  $post, $message) {
144
-	global $master_url;
144
+    global $master_url;
145 145
 
146 146
     $body = "";
147 147
     $owner = BoincUser::lookup_id($post->user);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 //////////////////// a banishment vote has been started  ///////////
198 198
 //
199 199
 function send_banish_vote_email($user, $duration, $reason, $end_time) {
200
-	global $master_url;
200
+    global $master_url;
201 201
     $now=time();
202 202
     $subject = PROJECT." banishment vote underway";
203 203
     $vote_url = $master_url."forum_banishment_vote.php";
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
     pm_send_msg($user, $user, $subject, $body, false);
220 220
 
221 221
     $body .= "\n\n<a href=".$vote_url."?action=yes&userid="
222
-             .$user->id
223
-           .">[vote to banish author]</a>\n\n"
224
-           ."<a href=".$vote_url."?action=no&userid="
225
-             .$user->id
226
-           .">[vote not to banish author]</a>";
222
+                .$user->id
223
+            .">[vote to banish author]</a>\n\n"
224
+            ."<a href=".$vote_url."?action=no&userid="
225
+                .$user->id
226
+            .">[vote not to banish author]</a>";
227 227
 
228 228
     $forum = new BoincForum;
229 229
     $forum->parent_type = 0;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 // - project forums: everyone in POST_REPORT_EMAILS
25 25
 // - team message board: team founder and admins
26 26
 //
27
-function mail_report_list($forum, $subject, $body, $must_send=false) {
27
+function mail_report_list($forum, $subject, $body, $must_send = false) {
28 28
     $success = true;
29 29
     switch ($forum->parent_type) {
30 30
     case 0:
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 function send_moderation_email($forum, $post, $thread, $explanation, $action) {
63 63
     global $master_url;
64 64
 
65
-    $moderator=get_logged_in_user();
65
+    $moderator = get_logged_in_user();
66 66
     $body = "";
67 67
     $user = BoincUser::lookup_id($post->user);
68 68
 
@@ -123,11 +123,11 @@  discard block
 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){
127
-    $title = PROJECT . ": A user has posted to '". $thread->title ."'";
128
-    $link = secure_url_base() . "forum_thread.php?id=" . $thread->id;
129
-    $body = "Another " . PROJECT . " user has posted to the thread
130
-\"" . $thread->title . "\".\n"
126
+function send_reply_notification_email($thread, $user) {
127
+    $title = PROJECT.": A user has posted to '".$thread->title."'";
128
+    $link = secure_url_base()."forum_thread.php?id=".$thread->id;
129
+    $body = "Another ".PROJECT." user has posted to the thread
130
+\"" . $thread->title."\".\n"
131 131
            ."To view the updated thread, visit:\n$link
132 132
 
133 133
 --------------------------
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
 //////////////////// a user clicks the red "x" to report a post ///////////
142 142
 //
143
-function send_report_post_email($user, $forum, $thread,  $post, $message) {
143
+function send_report_post_email($user, $forum, $thread, $post, $message) {
144 144
 	global $master_url;
145 145
 
146 146
     $body = "";
@@ -198,16 +198,16 @@  discard block
 block discarded – undo
198 198
 //
199 199
 function send_banish_vote_email($user, $duration, $reason, $end_time) {
200 200
 	global $master_url;
201
-    $now=time();
201
+    $now = time();
202 202
     $subject = PROJECT." banishment vote underway";
203 203
     $vote_url = $master_url."forum_banishment_vote.php";
204 204
     $body = "
205 205
 A vote has been started to banish you
206 206
 from the ".PROJECT." message boards until ".date('M j,
207
-Y G:i', $duration+$now).",
207
+Y G:i', $duration + $now).",
208 208
 because your postings have not followed our guidelines.
209 209
 
210
-This vote will last until ".date('M j, Y G:i',$end_time)." or until a majority
210
+This vote will last until ".date('M j, Y G:i', $end_time)." or until a majority
211 211
 decision has been reached.  If the vote does not result in banishment, you will be
212 212
 able to resume posting at that time.
213 213
     ";
Please login to merge, or discard this 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.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 
114 114
 For assistance with ".PROJECT." go to ".$master_url;
115 115
 
116
-    $subject = "THREAD $action REPORT: $thread->title";
116
+    $subject = "thread $action REPORT: $thread->title";
117 117
     $success = mail_report_list($forum, $subject, $body);
118 118
     $success &= send_email($user, $subject, $body);
119 119
     pm_send_msg($user, $user, $subject, $body, false);
Please login to merge, or discard this patch.
html/inc/akismet.inc 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     $master_url_enc = urlencode($master_url);
28 28
     $response = akismet_request("key=$key&blog=$master_url_enc", "rest.akismet.com", "/1.1/verify-key");
29
-    if ("valid" == $response[1] ) {
29
+    if ("valid" == $response[1]) {
30 30
         $post = urlencode($post);
31 31
         $ip = urlencode($_SERVER['REMOTE_ADDR']);
32 32
         $referrer = urlencode($_SERVER['HTTP_REFERER']);
@@ -56,15 +56,15 @@  discard block
 block discarded – undo
56 56
     $http_request  = "POST $path HTTP/1.0\r\n";
57 57
     $http_request .= "Host: $host\r\n";
58 58
     $http_request .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
59
-    $http_request .= "Content-Length: " . strlen($request) . "\r\n";
59
+    $http_request .= "Content-Length: ".strlen($request)."\r\n";
60 60
     $http_request .= "User-Agent: BOINC | Akismet 1.1\r\n";
61 61
     $http_request .= "\r\n";
62 62
     $http_request .= $request;
63 63
 
64 64
     $response = '';
65
-    if( false !== ( $fs = @fsockopen($host, $port, $errno, $errstr, 3) ) ) {
65
+    if (false !== ($fs = @fsockopen($host, $port, $errno, $errstr, 3))) {
66 66
         fwrite($fs, $http_request);
67
-        while ( !feof($fs) )
67
+        while (!feof($fs))
68 68
             $response .= fgets($fs, 1160); // One TCP-IP packet
69 69
         fclose($fs);
70 70
         $response = explode("\r\n\r\n", $response, 2);
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@  discard block
 block discarded – undo
42 42
 
43 43
         $response = akismet_request($request, "$key.rest.akismet.com", "/1.1/comment-check");
44 44
 
45
-        if ("true" == $response[1]) { // Akismet says it's spam
45
+        if ("true" == $response[1]) {
46
+// Akismet says it's spam
46 47
             return false;
47 48
         } else {
48 49
             return true;
@@ -64,8 +65,10 @@  discard block
 block discarded – undo
64 65
     $response = '';
65 66
     if( false !== ( $fs = @fsockopen($host, $port, $errno, $errstr, 3) ) ) {
66 67
         fwrite($fs, $http_request);
67
-        while ( !feof($fs) )
68
-            $response .= fgets($fs, 1160); // One TCP-IP packet
68
+        while ( !feof($fs) ) {
69
+                    $response .= fgets($fs, 1160);
70
+        }
71
+        // One TCP-IP packet
69 72
         fclose($fs);
70 73
         $response = explode("\r\n\r\n", $response, 2);
71 74
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 }
54 54
 
55 55
 function akismet_request($request, $host, $path, $port = 80) {
56
-    $http_request  = "POST $path HTTP/1.0\r\n";
56
+    $http_request  = "post $path HTTP/1.0\r\n";
57 57
     $http_request .= "Host: $host\r\n";
58 58
     $http_request .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
59 59
     $http_request .= "Content-Length: " . strlen($request) . "\r\n";
Please login to merge, or discard this patch.
boinc/modules/boincuser/views/views_handler_argument_boincteam_id.inc 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 class views_handler_argument_boincteam_id extends views_handler_argument_numeric {
10
-  function construct() {
10
+    function construct() {
11 11
     parent::construct();
12
-  }
12
+    }
13 13
 
14
-  function set_argument($arg) {
14
+    function set_argument($arg) {
15 15
     // When setting the ID argument, convert to BOINC ID
16 16
     $id = is_numeric($arg) ? $arg : 0;
17 17
     $boinc_id = db_result(db_query("SELECT team_id FROM {boincteam} WHERE nid = %d", $id));
18 18
     $this->argument = $boinc_id;
19 19
     return $this->validate_arg($boinc_id);
20
-  }
20
+    }
21 21
 }
Please login to merge, or discard this patch.
boinc/modules/boincuser/views/views_handler_argument_boincuser_id.inc 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 class views_handler_argument_boincuser_id extends views_handler_argument_numeric {
10
-  function construct() {
10
+    function construct() {
11 11
     parent::construct();
12
-  }
12
+    }
13 13
 
14
-  function set_argument($arg) {
14
+    function set_argument($arg) {
15 15
     // When setting the ID argument, convert to BOINC ID
16 16
     $id = is_numeric($arg) ? $arg : 0;
17 17
     $boinc_id = db_result(db_query("SELECT boinc_id FROM {boincuser} WHERE uid = %d", $id));
18 18
     $this->argument = $boinc_id;
19 19
     return $this->validate_arg($boinc_id);
20
-  }
20
+    }
21 21
 }
Please login to merge, or discard this patch.
boinc/modules/boincimport/views/views_handler_argument_boincteam_id.inc 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 class views_handler_argument_boincteam_id extends views_handler_argument_numeric {
10
-  function construct() {
10
+    function construct() {
11 11
     parent::construct();
12
-  }
12
+    }
13 13
 
14
-  function set_argument($arg) {
14
+    function set_argument($arg) {
15 15
     // When setting the ID argument, convert to BOINC ID
16 16
     $id = is_numeric($arg) ? $arg : 0;
17 17
     $boinc_id = db_result(db_query("SELECT team_id FROM {boincteam} WHERE nid = %d", $id));
18 18
     $this->argument = $boinc_id;
19 19
     return $this->validate_arg($boinc_id);
20
-  }
20
+    }
21 21
 }
Please login to merge, or discard this patch.
html/ops/failure_result_summary_by_host.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,5 +197,5 @@
 block discarded – undo
197 197
 
198 198
 admin_page_tail();
199 199
 
200
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
200
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
201 201
 ?>
Please login to merge, or discard this patch.
html/ops/bbcode_convert_response1.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@
 block discarded – undo
42 42
     $start_id = 0; //Set this to something else if you like
43 43
     $profiles = _mysql_query("select * from profile where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45
-    $i=0;
46
-    while ($profile = _mysql_fetch_object($profiles)){
45
+    $i = 0;
46
+    while ($profile = _mysql_fetch_object($profiles)) {
47 47
         $i++; 
48 48
         if ($i%100 == 0) {                      //For every 100 profiles
49
-            echo $profile->userid.". "; flush();   // print out where we are
49
+            echo $profile->userid.". "; flush(); // print out where we are
50 50
             //usleep(200000);
51 51
         }
52 52
         
53
-        if ($profile->userid > $start_id){
53
+        if ($profile->userid > $start_id) {
54 54
             fix_profile($profile);
55 55
         }
56 56
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,14 +43,15 @@
 block discarded – undo
43 43
     $profiles = _mysql_query("select * from profile where userid>$start_id order by userid");
44 44
     echo _mysql_error();
45 45
     $i=0;
46
-    while ($profile = _mysql_fetch_object($profiles)){
46
+    while ($profile = _mysql_fetch_object($profiles)) {
47 47
         $i++; 
48
-        if ($i%100 == 0) {                      //For every 100 profiles
48
+        if ($i%100 == 0) {
49
+//For every 100 profiles
49 50
             echo $profile->userid.". "; flush();   // print out where we are
50 51
             //usleep(200000);
51 52
         }
52 53
         
53
-        if ($profile->userid > $start_id){
54
+        if ($profile->userid > $start_id) {
54 55
             fix_profile($profile);
55 56
         }
56 57
     }
Please login to merge, or discard this patch.
html/ops/failure_result_summary_by_platform.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,5 +197,5 @@
 block discarded – undo
197 197
 
198 198
 admin_page_tail();
199 199
 
200
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
200
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
201 201
 ?>
Please login to merge, or discard this patch.