@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | if ($user->id != $team->userid) { //don't show current founder |
96 | 96 | $user_total_credit = format_credit($user->total_credit); |
97 | 97 | $user_expavg_credit = format_credit($user->expavg_credit); |
98 | - $selected = ($user->id == $team->ping_user)?"selected":""; |
|
98 | + $selected = ($user->id == $team->ping_user) ? "selected" : ""; |
|
99 | 99 | echo ' |
100 | 100 | <tr> |
101 | 101 | <td><input type="radio" name="userid" value="'.$user->id.'"> |
@@ -121,5 +121,5 @@ discard block |
||
121 | 121 | echo "</form>"; |
122 | 122 | page_tail(); |
123 | 123 | |
124 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
124 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
125 | 125 | ?> |
@@ -92,7 +92,8 @@ |
||
92 | 92 | |
93 | 93 | $navailable_users = 0; |
94 | 94 | foreach ($users as $user) { |
95 | - if ($user->id != $team->userid) { //don't show current founder |
|
95 | + if ($user->id != $team->userid) { |
|
96 | +//don't show current founder |
|
96 | 97 | $user_total_credit = format_credit($user->total_credit); |
97 | 98 | $user_expavg_credit = format_credit($user->expavg_credit); |
98 | 99 | $selected = ($user->id == $team->ping_user)?"selected":""; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // hardwired app name for now |
46 | 46 | define('APP_NAME', 'remote_test'); |
47 | 47 | |
48 | -$project = $master_url; // from project.inc |
|
48 | +$project = $master_url; // from project.inc |
|
49 | 49 | $user = get_logged_in_user(); |
50 | 50 | $auth = $user->authenticator; |
51 | 51 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $user_submit = BoincUserSubmit::lookup_userid($user->id); |
159 | 159 | if (!$user_submit) return null; |
160 | 160 | $a = array(); |
161 | - foreach($apps as $app) { |
|
161 | + foreach ($apps as $app) { |
|
162 | 162 | if ($user_submit->submit_all) { |
163 | 163 | $a[] = $app; |
164 | 164 | } else { |
@@ -235,9 +235,9 @@ discard block |
||
235 | 235 | $input_url = get_str('input_url'); |
236 | 236 | if (!$input_url) error_page("missing input URL"); |
237 | 237 | $param_lo = (double)get_str('param_lo'); |
238 | - if ($param_lo<0 || $param_lo>60) error_page("param lo must be in 0..60"); |
|
238 | + if ($param_lo < 0 || $param_lo > 60) error_page("param lo must be in 0..60"); |
|
239 | 239 | $param_hi = (double)get_str('param_hi'); |
240 | - if ($param_hi<0 || $param_hi>60 || $param_hi <= $param_lo) { |
|
240 | + if ($param_hi < 0 || $param_hi > 60 || $param_hi <= $param_lo) { |
|
241 | 241 | error_page("param hi must be in 0..60 and > param lo"); |
242 | 242 | } |
243 | 243 | $param_inc = (double)get_str('param_inc'); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $f->source = $input_url; |
255 | 255 | $f->mode = 'semilocal'; |
256 | 256 | |
257 | - for ($x=$param_lo; $x<$param_hi; $x += $param_inc) { |
|
257 | + for ($x = $param_lo; $x < $param_hi; $x += $param_inc) { |
|
258 | 258 | $job = new StdClass; |
259 | 259 | $job->rsc_fpops_est = $x*1e9; |
260 | 260 | $job->command_line = "--t $x"; |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | "status", |
344 | 344 | "Canonical instance<br><p class=\"text-muted\">click to see result page on BOINC server</p>" |
345 | 345 | ); |
346 | - foreach($batch->jobs as $job) { |
|
346 | + foreach ($batch->jobs as $job) { |
|
347 | 347 | $id = (int)$job->id; |
348 | 348 | $resultid = (int)$job->canonical_instance_id; |
349 | 349 | if ($resultid) { |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | "Instance ID<br><p class=\"text-muted\">click for result page on BOINC server</p>", |
387 | 387 | "State", "Output files" |
388 | 388 | ); |
389 | - foreach($reply->instances as $inst) { |
|
389 | + foreach ($reply->instances as $inst) { |
|
390 | 390 | echo "<tr> |
391 | 391 | <td><a href=result.php?resultid=$inst->id>$inst->id</a></td> |
392 | 392 | <td>$inst->state</td> |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | list($batch, $errmsg) = boinc_query_batch($req); |
303 | 303 | if ($errmsg) error_page(htmlentities($errmsg)); |
304 | 304 | |
305 | - page_head("Batch $req->batch_id"); |
|
305 | + page_head("batch $req->batch_id"); |
|
306 | 306 | start_table(); |
307 | 307 | row2("name", $batch->name); |
308 | 308 | row2("application", $batch->app_name); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | list($reply, $errmsg) = boinc_query_job($req); |
379 | 379 | if ($errmsg) error_page(htmlentities($errmsg)); |
380 | 380 | |
381 | - page_head("Job $req->job_id"); |
|
381 | + page_head("job $req->job_id"); |
|
382 | 382 | echo "<a href=$project/workunit.php?wuid=$req->job_id>View workunit page on BOINC server</a>\n"; |
383 | 383 | echo "<h2>Instances</h2>\n"; |
384 | 384 | start_table(); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | check_get_args(array("id")); |
23 | 23 | |
24 | 24 | function show_credit_wap($user) { |
25 | - $retstr = "<br/>User TotCred: " . format_credit($user->total_credit) . "<br/>"; |
|
26 | - $retstr .= "User AvgCred: " . format_credit($user->expavg_credit) . "<br/>"; |
|
25 | + $retstr = "<br/>User TotCred: ".format_credit($user->total_credit)."<br/>"; |
|
26 | + $retstr .= "User AvgCred: ".format_credit($user->expavg_credit)."<br/>"; |
|
27 | 27 | return $retstr; |
28 | 28 | } |
29 | 29 | |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | $wapstr .= show_credit_wap($user); |
46 | 46 | if ($user->teamid && $team) { |
47 | 47 | $wapstr .= "<br/>".tra("Team:")." ".$team->name."<br/>"; |
48 | - $wapstr .= tra("Team TotCred:")." " . format_credit($team->total_credit) . "<br/>"; |
|
49 | - $wapstr .= tra("Team AvgCred:")." " . format_credit($team->expavg_credit) . "<br/>"; |
|
48 | + $wapstr .= tra("Team TotCred:")." ".format_credit($team->total_credit)."<br/>"; |
|
49 | + $wapstr .= tra("Team AvgCred:")." ".format_credit($team->expavg_credit)."<br/>"; |
|
50 | 50 | } else { |
51 | 51 | $wapstr .= "<br/>".tra("Team: None")."<br/>"; |
52 | 52 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | start_table(); |
53 | 53 | row2("From:", "$user->name <$user->email_addr>"); |
54 | -for ($i=0; $i<6; $i++) { |
|
54 | +for ($i = 0; $i < 6; $i++) { |
|
55 | 55 | row2(tra("To:"), "<input size=30 name=e$i>"); |
56 | 56 | } |
57 | 57 | row2(tra("Subject"), "<input size=80 name=subject value=\"$subject\">"); |
@@ -58,5 +58,5 @@ |
||
58 | 58 | <p>".tra("These other projects are not associated with %1, and we cannot vouch for their security practices or the nature of their research. Join them at your own risk.", PROJECT); |
59 | 59 | } |
60 | 60 | page_tail(); |
61 | -$cvs_version_tracker[]="\$Id$"; |
|
61 | +$cvs_version_tracker[] = "\$Id$"; |
|
62 | 62 | ?> |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $cache_args = "userid=$userid"; |
46 | 46 | $cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args); |
47 | -if ($cacheddata){ |
|
47 | +if ($cacheddata) { |
|
48 | 48 | // Already got a cached version of the information |
49 | 49 | $community_links_object = unserialize($cacheddata); |
50 | 50 | } else { |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $cache_args = "userid=$userid"; |
46 | 46 | $cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args); |
47 | -if ($cacheddata){ |
|
47 | +if ($cacheddata) { |
|
48 | 48 | // Already got a cached version of the information |
49 | 49 | $community_links_object = unserialize($cacheddata); |
50 | 50 | } else { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | global $xml; |
31 | 31 | $user = BoincUser::lookup_id($delta->userid); |
32 | 32 | $when = time_str($delta->timestamp); |
33 | - $what = $delta->joining?"joined":"quit"; |
|
33 | + $what = $delta->joining ? "joined" : "quit"; |
|
34 | 34 | if ($xml) { |
35 | 35 | echo " <action> |
36 | 36 | <id>$user->id</id> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } else { |
44 | 44 | echo "<tr> |
45 | 45 | <td>$when</td> |
46 | - <td>",user_links($user, BADGE_HEIGHT_MEDIUM)," (ID $user->id)</td> |
|
46 | + <td>", user_links($user, BADGE_HEIGHT_MEDIUM), " (ID $user->id)</td> |
|
47 | 47 | <td>$what</td> |
48 | 48 | <td>$delta->total_credit</td> |
49 | 49 | </tr> |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | ); |
83 | 83 | } |
84 | 84 | $deltas = BoincTeamDelta::enum("teamid=$teamid order by timestamp"); |
85 | -foreach($deltas as $delta) { |
|
85 | +foreach ($deltas as $delta) { |
|
86 | 86 | show_delta($delta); |
87 | 87 | } |
88 | 88 | if ($xml) { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | if ($format == 'xml') { |
77 | 77 | echo "<teams>\n"; |
78 | 78 | $total = 0; |
79 | - foreach($teams as $team) { |
|
79 | + foreach ($teams as $team) { |
|
80 | 80 | show_team_xml($team); |
81 | 81 | $total++; |
82 | 82 | if ($total == 100) break; |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | echo "<p>"; |
92 | 92 | echo tra("You may view these teams' members, statistics, and information."); |
93 | 93 | echo "<ul>"; |
94 | - foreach($teams as $team) { |
|
94 | + foreach ($teams as $team) { |
|
95 | 95 | echo "<li>"; |
96 | 96 | echo "<a href=team_display.php?teamid=$team->id>"; |
97 | 97 | echo "$team->name</a></li>"; |
98 | 98 | } |
99 | 99 | echo "</ul>"; |
100 | - if (count($teams)==100) { |
|
100 | + if (count($teams) == 100) { |
|
101 | 101 | echo |
102 | 102 | tra("More than 100 teams match your search. The first 100 are shown.") |
103 | 103 | ."<br> |
@@ -52,7 +52,8 @@ |
||
52 | 52 | echo "<teams>\n"; |
53 | 53 | $total = 0; |
54 | 54 | foreach ($team_id_array as $team_id) { |
55 | - if (is_numeric($team_id)) { //make sure only numbers get through |
|
55 | + if (is_numeric($team_id)) { |
|
56 | +//make sure only numbers get through |
|
56 | 57 | $team = BoincTeam::lookup_id($team_id); |
57 | 58 | if ($team) { |
58 | 59 | show_team_xml($team); |
@@ -47,13 +47,13 @@ discard block |
||
47 | 47 | start_table(); |
48 | 48 | row1(tra("Banishment Vote")); |
49 | 49 | |
50 | -if (get_str('action')=="start") { |
|
50 | +if (get_str('action') == "start") { |
|
51 | 51 | if (!$user) { |
52 | 52 | error_page(tra("No user with this ID found.")); |
53 | 53 | } |
54 | 54 | BoincForumPrefs::lookup($user); |
55 | 55 | $x = $user->prefs->banished_until; |
56 | - if ($x>time()) { |
|
56 | + if ($x > time()) { |
|
57 | 57 | error_page(tra("User is already banished")); |
58 | 58 | } |
59 | 59 | //display input that selects reason |
@@ -77,10 +77,10 @@ discard block |
||
77 | 77 | "", |
78 | 78 | "<input class=\"btn btn-default\" type=\"submit\" name=\"submit\" value=\"".tra("Proceed with vote")."\">" |
79 | 79 | ); |
80 | -} elseif (get_str('action')=="yes") { |
|
81 | - vote_yes($config,$logged_in_user,$user); |
|
82 | -} elseif (get_str('action')=="no") { |
|
83 | - vote_no($config,$logged_in_user,$user); |
|
80 | +} elseif (get_str('action') == "yes") { |
|
81 | + vote_yes($config, $logged_in_user, $user); |
|
82 | +} elseif (get_str('action') == "no") { |
|
83 | + vote_no($config, $logged_in_user, $user); |
|
84 | 84 | } else { |
85 | 85 | error_page("Unknown action"); |
86 | 86 | } |