Passed
Push — server_release/1/1.4 ( 99de7f...3b0199 )
by
unknown
10:47
created
html/user/team_search.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 // where team includes a field "refcnt".
32 32
 // 
33 33
 function merge_lists($list1, &$list2, $weight) {
34
-    foreach($list1 as $team) {
34
+    foreach ($list1 as $team) {
35 35
         $id = $team->id;
36 36
         if (array_key_exists($id, $list2)) {
37 37
             $list2[$id]->refcnt += $weight;
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         if (defined("SHOW_NONVALIDATED_TEAMS")) {
98 98
             $user = BoincUser::lookup_id($team->userid);
99 99
             echo "<td>";
100
-            echo $user->email_validated?"Yes":"No";
100
+            echo $user->email_validated ? "Yes" : "No";
101 101
             echo "</td>\n";
102 102
         }
103 103
         echo "
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     xml_header();
138 138
     echo "<teams>\n";
139 139
     sort_list($list);
140
-    foreach($list as $team) {
140
+    foreach ($list as $team) {
141 141
         show_team_xml($team);
142 142
     }
143 143
     echo "</teams>\n";
@@ -164,14 +164,14 @@  discard block
 block discarded – undo
164 164
         merge_lists($list2, $list, 3);
165 165
         $tried = true;
166 166
     }
167
-    if (strlen($params->country) && $params->country!='None') {
167
+    if (strlen($params->country) && $params->country != 'None') {
168 168
         $country = BoincDb::escape_string($params->country);
169 169
         $list2 = get_teams("country = '$country'", $params->active);
170 170
         //echo "<br>country matches: ",sizeof($list2);
171 171
         merge_lists($list2, $list, 1);
172 172
         $tried = true;
173 173
     }
174
-    if ($params->type and $params->type>1) {
174
+    if ($params->type and $params->type > 1) {
175 175
         $list2 = get_teams("type=$params->type", $params->active);
176 176
         //echo "<br>type matches: ",sizeof($list2);
177 177
         merge_lists($list2, $list, 2);
Please login to merge, or discard this patch.
html/user/show_coproc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
         echo $x;
93 93
         break;
94 94
     }
95
-    echo "</td><td align=right>".format_credit_large($y->credit),"</td><td align=right>$y->nresults</td></tr>\n";
95
+    echo "</td><td align=right>".format_credit_large($y->credit), "</td><td align=right>$y->nresults</td></tr>\n";
96 96
 }
97 97
 
98 98
 $mode = get_str('mode', true);
Please login to merge, or discard this patch.
html/user/account_finish_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 $auth = post_str("auth");
24 24
 $name = post_str("name");
25 25
 
26
-if (strlen($name)==0) {
26
+if (strlen($name) == 0) {
27 27
     error_page(tra("You must supply a name for your account"));
28 28
 }
29 29
 if ($name != sanitize_tags($name)) {
Please login to merge, or discard this patch.
html/user/apps.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             echo "        <beta/>\n";
49 49
         }
50 50
     } else {
51
-        $b = $app->beta?" (beta test)":"";
51
+        $b = $app->beta ? " (beta test)" : "";
52 52
         echo "
53 53
             <tr><th class=\"bg-primary\" colspan=4>$app->user_friendly_name$b</th></tr>
54 54
             <tr>
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     }
62 62
     foreach ($platforms as $platform) {
63 63
         $avs = latest_avs_app_platform($app->id, $platform->id);
64
-        foreach($avs as $av) {
64
+        foreach ($avs as $av) {
65 65
             $create_time_f = pretty_time_str($av->create_time);
66 66
             if ($xml) {
67 67
                 echo "    <version>\n";
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 $gf = $av->expavg_credit/200;
84 84
                 $total_gf += $gf;
85 85
                 $gf = number_format($gf, 0);
86
-                $b = $av->beta?" (beta test)":"";
86
+                $b = $av->beta ? " (beta test)" : "";
87 87
                 echo "<tr>
88 88
                     <td>$platform->user_friendly_name</td>
89 89
                     <td>$version_num_f$b</td>
Please login to merge, or discard this patch.
html/user/forum_moderate_post_action.php 1 patch
Spacing   +8 added lines, -8 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;
@@ -164,5 +164,5 @@  discard block
 block discarded – undo
164 164
 
165 165
 header('Location: forum_thread.php?id='.$thread->id);
166 166
 
167
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
167
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
168 168
 ?>
Please login to merge, or discard this patch.
html/user/host_edit_form.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     if (!hosts_compatible($host, $host2, $detail)) continue;
51 51
     $hosts[] = $host2;
52 52
     $nhosts++;
53
-    if ($nhosts==500) break;
53
+    if ($nhosts == 500) break;
54 54
 }
55 55
 if ($nhosts == 1) {
56 56
     echo "<br>".tra("No hosts are eligible for merging with this one.");
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
     <script>
91 91
         function set_all() {
92 92
 ";
93
-for ($i=1; $i<$nhosts; $i++) {
93
+for ($i = 1; $i < $nhosts; $i++) {
94 94
     echo "document.host_list.id_$i.checked=1;\n";
95 95
 }
96 96
 echo "
97 97
         }
98 98
         function clear_all() {
99 99
 ";
100
-for ($i=1; $i<$nhosts; $i++) {
100
+for ($i = 1; $i < $nhosts; $i++) {
101 101
     echo "document.host_list.id_$i.checked=0;\n";
102 102
 }
103 103
 echo "
Please login to merge, or discard this patch.
html/user/user_search.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         <td align=right>", format_credit($user->expavg_credit), "</td>
38 38
         <td align=right>", format_credit_large($user->total_credit), "</td>
39 39
         <td>", $user->country, "</td>
40
-        <td>", time_str($user->create_time),"</td>
40
+        <td>", time_str($user->create_time), "</td>
41 41
         </tr>
42 42
     ";
43 43
 }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     $where = "true";
84 84
     $search_string = get_str('search_string');
85 85
     if (strlen($search_string)) {
86
-        if (strlen($search_string)<3) {
86
+        if (strlen($search_string) < 3) {
87 87
             error_page(tra("search string must be at least 3 characters"));
88 88
         }
89 89
         $s = BoincDb::escape_string($search_string);
@@ -111,17 +111,17 @@  discard block
 block discarded – undo
111 111
     $search_type = get_str('search_type', true);
112 112
     $order_clause = "id desc";
113 113
     if ($search_type == 'rac') {
114
-        $order_clause ="expavg_credit desc";
114
+        $order_clause = "expavg_credit desc";
115 115
     } else if ($search_type == 'total') {
116
-        $order_clause ="total_credit desc";
116
+        $order_clause = "total_credit desc";
117 117
     }
118 118
 
119 119
     $fields = "id, create_time, name, country, total_credit, expavg_credit, teamid, url, has_profile, donated";
120 120
     $users = BoincUser::enum_fields($fields, $where, "order by $order_clause limit 100");
121 121
     page_head(tra("User search results"));
122
-    $n=0;
122
+    $n = 0;
123 123
     foreach ($users as $user) {
124
-        if ($n==0) {
124
+        if ($n == 0) {
125 125
             start_table('table-striped');
126 126
             row_heading_array(
127 127
                 array(
@@ -152,5 +152,5 @@  discard block
 block discarded – undo
152 152
     user_search_form();
153 153
 }
154 154
 
155
-$cvs_version_tracker[]="\$Id: user_search.php 13586 2007-09-13 09:46:36Z Rytis $";  //Generated automatically - do not edit
155
+$cvs_version_tracker[] = "\$Id: user_search.php 13586 2007-09-13 09:46:36Z Rytis $"; //Generated automatically - do not edit
156 156
 ?>
Please login to merge, or discard this patch.
html/ops/bossa_admin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
     ";
102 102
     start_table();
103 103
     row1("User settings");
104
-    $x = ($flags&BOLT_FLAGS_SHOW_ALL)?"checked":"";
104
+    $x = ($flags&BOLT_FLAGS_SHOW_ALL) ? "checked" : "";
105 105
     row2("Show hidden apps?", "<input type=checkbox name=show_all $x>");
106
-    $x = ($flags&BOLT_FLAGS_DEBUG)?"checked":"";
106
+    $x = ($flags&BOLT_FLAGS_DEBUG) ? "checked" : "";
107 107
     row2("Show debugging output?", "<input type=checkbox name=debug $x>");
108 108
     row2("", "<input class=\"btn btn-default\" type=submit value=\"Update user\">");
109 109
     end_table();
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     foreach ($jobs as $job) {
172 172
         $t = time_str($job->create_time);
173 173
         $s = job_state_string($job->state);
174
-        $j = $i++ % 2;
174
+        $j = $i++%2;
175 175
         echo "<tr class=row$j>
176 176
             <td>
177 177
                 $job->id <a href=bossa_admin.php?action=job_show_insts&job_id=$job->id>(details)</a><br>
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         table_row(
204 204
             "$batch->id | <a href=bossa_admin.php?action=show_batch&batch_id=$batch->id>show jobs</a> | <a href=bossa_admin.php?action=clear_batch_confirm&batch_id=$batch->id>delete instances</a>",
205 205
             "$batch->name",
206
-            $batch->calibration?"yes":"no",
206
+            $batch->calibration ? "yes" : "no",
207 207
             time_str($batch->create_time),
208 208
             BossaJob::count("batch_id=$batch->id"),
209 209
             BossaJob::count("batch_id=$batch->id and state=2")
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
     if (!$time_estimate) $time_estimate = 60;
334 334
     $time_limit = get_str('time_limit');
335 335
     if (!$time_limit) $time_limit = 3600;
336
-    $calibration_frac = get_str('calibration_frac' , true);
336
+    $calibration_frac = get_str('calibration_frac', true);
337 337
     if (!$calibration_frac) $calibration_frac = 0;
338 338
     $now = time();
339 339
     $app_id = BossaApp::insert("(create_time, name, short_name, description, bolt_course_id, time_estimate, time_limit, calibration_frac) values ($now, '$name', '$short_name', '$description', $courseid, $time_estimate, $time_limit, $calibration_frac)");
Please login to merge, or discard this patch.
html/ops/block_host.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@  discard block
 block discarded – undo
20 20
 
21 21
 // TODO: document; use new DB interface
22 22
 
23
-include_once( "../inc/db.inc" );
24
-include_once( "../inc/util.inc" );
25
-include_once( "../inc/db_ops.inc" );
26
-include_once( "../inc/util_ops.inc" );
27
-include_once( "../inc/prefs.inc" );
23
+include_once("../inc/db.inc");
24
+include_once("../inc/util.inc");
25
+include_once("../inc/db_ops.inc");
26
+include_once("../inc/util_ops.inc");
27
+include_once("../inc/prefs.inc");
28 28
 
29 29
 db_init();
30 30
 
31 31
 if (get_int('hostid')) {
32
-    $hostid = get_int( 'hostid' );
32
+    $hostid = get_int('hostid');
33 33
 } else {
34 34
     error_page("no hostid");
35 35
 }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 admin_page_head($title);
41 41
 
42
-if($hostid > 0) {
42
+if ($hostid > 0) {
43 43
     $result = _mysql_query("UPDATE host SET max_results_day=1 WHERE id=".$hostid);
44 44
 }
45 45
 
Please login to merge, or discard this patch.