Passed
Push — master ( 33b95b...1e3eac )
by David
09:38 queued 29s
created
html/ops/problem_host.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
     Average credit: ".$host->expavg_credit."
38 38
     Average update time: ".time_str($host->expavg_time)."
39 39
     IP address: $host->last_ip_addr (same the last $host->nsame_ip_addr times)
40
-    Domain name: " . $host->domain_name;
40
+    Domain name: ".$host->domain_name;
41 41
     $x = $host->timezone/3600;
42
-    if ($x >= 0) $x="+$x";
43
-    $host_content.="
42
+    if ($x >= 0) $x = "+$x";
43
+    $host_content .= "
44 44
     Local Time = UTC $x hours
45
-    Number of CPUs: " . $host->p_ncpus."
45
+    Number of CPUs: ".$host->p_ncpus."
46 46
     CPU: $host->p_vendor $host->p_model
47 47
     FP ops/sec: ".$host->p_fpops."
48 48
     Int ops/sec: ".$host->p_iops."
@@ -50,28 +50,28 @@  discard block
 block discarded – undo
50 50
     Operating System: $host->os_name $host->os_version";
51 51
     $x = $host->m_nbytes/(1024*1024);
52 52
     $y = round($x, 2);
53
-    $host_content.="
53
+    $host_content .= "
54 54
     Memory: $y MB";
55 55
     $x = $host->m_cache/1024;
56 56
     $y = round($x, 2);
57
-    $host_content.="
57
+    $host_content .= "
58 58
     Cache: $y KB";
59 59
     $x = $host->m_swap/(1024*1024);
60 60
     $y = round($x, 2);
61
-    $host_content.="
61
+    $host_content .= "
62 62
     Swap Space: $y MB";
63 63
     $x = $host->d_total/(1024*1024*1024);
64 64
     $y = round($x, 2);
65
-    $host_content.="
65
+    $host_content .= "
66 66
     Total Disk Space: $y GB";
67 67
     $x = $host->d_free/(1024*1024*1024);
68 68
     $y = round($x, 2);
69
-    $host_content.="
69
+    $host_content .= "
70 70
     Free Disk Space: $y GB
71 71
     Avg network bandwidth (upstream): $host->n_bwup bytes/sec
72 72
     Avg network bandwidth (downstream): $host->n_bwdown bytes/sec";
73 73
     $x = $host->avg_turnaround/86400;
74
-    $host_content.="
74
+    $host_content .= "
75 75
     Average turnaround: ".round($x, 2)." days
76 76
     Number of RPCs: $host->rpc_seqno
77 77
     Last RPC: ".time_str($host->rpc_time)."
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 installation.  Could you please have a look at it?
89 89
 
90 90
 Sincerely,
91
-        The ". PROJECT." team
91
+        The ".PROJECT." team
92 92
 ";
93 93
 $body .= "
94 94
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 " . $host_content."
97 97
 
98 98
 For further information and assistance with ".PROJECT." go to $master_url";
99
-    echo nl2br($body) . "<br><br>";
99
+    echo nl2br($body)."<br><br>";
100 100
     return send_email($user, $subject, $body);
101 101
 
102 102
 }
Please login to merge, or discard this patch.
html/ops/create_forums.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
     return $db->insert_id();
42 42
 }
43 43
 
44
-function create_forum($category, $orderID, $title, $description, $is_dev_blog=0) {
44
+function create_forum($category, $orderID, $title, $description, $is_dev_blog = 0) {
45 45
     $q = "(category, orderID, title, description, is_dev_blog) values ($category, $orderID, '$title', '$description', $is_dev_blog)";
46 46
     $db = BoincDB::get();
47
-    $result = $db->insert("forum",$q);
47
+    $result = $db->insert("forum", $q);
48 48
     if (!$result) {
49 49
         $forum = BoincForum::lookup("category=$category and title='$title'");
50 50
         if ($forum) return $forum->id;
Please login to merge, or discard this patch.
html/ops/list_new_users.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 \***********************************************************************/
28 28
 
29 29
 $limit = get_int('limit', true);
30
-if (! $limit > 0 ) $limit = 30;
30
+if (!$limit > 0) $limit = 30;
31 31
 
32 32
 
33 33
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 echo "<input class=\"btn btn-default\" type=\"submit\" value=\"Display\">\n";
49 49
 echo "</form>\n";
50 50
 
51
-$query="SELECT * FROM user ORDER BY create_time DESC LIMIT $limit";
51
+$query = "SELECT * FROM user ORDER BY create_time DESC LIMIT $limit";
52 52
 $result = _mysql_query($query);
53 53
 if (_mysql_num_rows($result) < 1) {
54 54
     echo "There are no new users.";
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     $joined = time_str($row->create_time);
67 67
     $email_validated = $row->email_validated;
68 68
 
69
-    $team_name="";
70
-    if($row->teamid > 0){
69
+    $team_name = "";
70
+    if ($row->teamid > 0) {
71 71
         $team = BoincTeam::lookup_id($row->teamid);
72 72
         $team_name = $team->name;
73 73
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     if ($special_bits != "0") {
81 81
         for ($i = 0; $i < 7; $i++) {
82 82
             $bit = substr($special_bits, $i, 1);
83
-            if ($bit == '1'){
83
+            if ($bit == '1') {
84 84
                 if (!empty($roles)) {
85 85
                     $roles .= ", ";
86 86
                 }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     // Banished?
96 96
     if (!empty($user->banished_until)) {
97 97
         $dt = $user->banished_until - time();
98
-        if( $dt > 0 ) {
98
+        if ($dt > 0) {
99 99
             $x = "<span style=\"color: #ff0000\">Currently banished</span>";
100 100
         }
101 101
         else {
Please login to merge, or discard this patch.
html/user/team_email_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     }
51 51
     echo "<users>\n";
52 52
     $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, expavg_time, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
53
-    foreach($users as $user) {
53
+    foreach ($users as $user) {
54 54
         show_team_member($user, $creditonly);
55 55
     }
56 56
     echo "</users>\n";
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
84
-foreach($users as $user) {
84
+foreach ($users as $user) {
85 85
     if ($plain) {
86 86
         echo "$user->name $user->id\n";
87 87
     } else {
Please login to merge, or discard this patch.
html/user/prefs_remove.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 $venue = get_str("venue");
30 30
 $confirmed = get_str("confirmed", true);
31 31
 $columns = get_int("cols", true);
32
-$c = $columns?"&cols=$columns":"";
32
+$c = $columns ? "&cols=$columns" : "";
33 33
 
34 34
 if ($confirmed) {
35 35
     if ($subset == "global") {
Please login to merge, or discard this patch.
html/user/forum_search.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
     </select>");
57 57
 
58 58
 $forumid = null;
59
-if (get_str("forumid",true)){
59
+if (get_str("forumid", true)) {
60 60
     $forumid = get_str("forumid");
61 61
 }
62
-$forumlist="<option value=\"-1\">".tra("All")."</option>";
62
+$forumlist = "<option value=\"-1\">".tra("All")."</option>";
63 63
 $categories = BoincCategory::enum();
64 64
 foreach ($categories as $category) {
65 65
     $forums = BoincForum::enum("parent_type=0 and category=$category->id");
66 66
     foreach ($forums as $forum) {
67
-        if ($forum->id==$forumid){
68
-            $forumlist.="<option selected value=\"".$forum->id."\">".$forum->title."</option>";
67
+        if ($forum->id == $forumid) {
68
+            $forumlist .= "<option selected value=\"".$forum->id."\">".$forum->title."</option>";
69 69
         } else {
70
-            $forumlist.="<option value=\"".$forum->id."\">".$forum->title."</option>";
70
+            $forumlist .= "<option value=\"".$forum->id."\">".$forum->title."</option>";
71 71
         }
72 72
     }
73 73
 }
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
     '<select class="form-control" name="search_forum">'.$forumlist.'</select');
77 77
 
78 78
 $sortlist = null;
79
-foreach ($thread_sort_styles as $id => $style){
80
-    if ($id == CREATE_TIME_NEW){
81
-        $sortlist.="<option selected value=\"".$id."\">".$style."</option>";
79
+foreach ($thread_sort_styles as $id => $style) {
80
+    if ($id == CREATE_TIME_NEW) {
81
+        $sortlist .= "<option selected value=\"".$id."\">".$style."</option>";
82 82
     } else {
83
-        $sortlist.="<option value=\"".$id."\">".$style."</option>";
83
+        $sortlist .= "<option value=\"".$id."\">".$style."</option>";
84 84
     }
85 85
 }
86 86
 row2(tra("Sort by"),
Please login to merge, or discard this patch.
html/user/forum_rate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     $rating = post_int('rating', true);
35 35
     if (!$choice) $choice = get_str('choice', true);
36 36
 
37
-    if ($choice == SOLUTION or $choice=="p") {
37
+    if ($choice == SOLUTION or $choice == "p") {
38 38
         $rating = 1;
39 39
     } else {
40 40
         $rating = -1;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     // Make sure the user has the forum's minimum amount of RAC and total credit
54 54
     // before allowing them to rate a post.
55 55
     //
56
-    if ($user->total_credit<$forum->rate_min_total_credit || $user->expavg_credit<$forum->rate_min_expavg_credit) {
56
+    if ($user->total_credit < $forum->rate_min_total_credit || $user->expavg_credit < $forum->rate_min_expavg_credit) {
57 57
         error_page(tra("You need more average or total credit to rate a post."));
58 58
     }
59 59
 
Please login to merge, or discard this patch.
html/user/create_account_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     }
65 65
 }
66 66
 
67
-form_start("create_account_action.php","post");
67
+form_start("create_account_action.php", "post");
68 68
 create_account_form($teamid, $next_url);
69 69
 global $recaptcha_public_key;
70 70
 if ($recaptcha_public_key) {
Please login to merge, or discard this patch.
html/user/pending.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     $sum = 0;
48 48
     echo "<pending_credit>\n";
49 49
     $results = BoincResult::enum("userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0");
50
-    foreach($results as $result) {
50
+    foreach ($results as $result) {
51 51
         echo "<result>\n";
52 52
         echo "    <resultid>".$result->id."</resultid>\n";
53 53
         echo "    <workunitid>".$result->workunitid."</workunitid>\n";
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     start_table();
68 68
     echo "<tr><th>".tra("Result ID")."</th><th>".tra("Workunit ID")."</th><th>".tra("Host ID")."</th><th>".tra("Claimed credit")."</th></tr>\n";
69 69
     $results = BoincResult::enum("userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0");
70
-    foreach($results as $result) {
70
+    foreach ($results as $result) {
71 71
         echo "<tr>\n";
72 72
         echo "<td><a href=\"result.php?resultid=$result->id\">$result->id</a></td>\n";
73 73
         echo "<td><a href=\"workunit.php?wuid=$result->workunitid\">$result->workunitid</a></td>\n";
Please login to merge, or discard this patch.