@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | start_table(); |
36 | 36 | |
37 | -switch($table){ |
|
37 | +switch($table) { |
|
38 | 38 | case "platform": |
39 | 39 | break; |
40 | 40 | case "app": |
@@ -100,7 +100,8 @@ |
||
100 | 100 | echo "</p>\n"; |
101 | 101 | echo "</form>\n"; |
102 | 102 | |
103 | -} else { // if ($qclause) |
|
103 | +} else { |
|
104 | +// if ($qclause) |
|
104 | 105 | |
105 | 106 | $query = "SELECT id, name FROM workunit WHERE canonical_resultid = 0 AND error_mask = 0 AND $qclause;"; |
106 | 107 | $db = BoincDb::get(true); |
@@ -45,14 +45,15 @@ |
||
45 | 45 | $posts = _mysql_query("select * from post where id>$start_id order by id"); |
46 | 46 | echo _mysql_error(); |
47 | 47 | $i=0; |
48 | - while ($post = _mysql_fetch_object($posts)){ |
|
48 | + while ($post = _mysql_fetch_object($posts)) { |
|
49 | 49 | $i++; |
50 | - if ($i%100 == 0) { //For every 100 posts |
|
50 | + if ($i%100 == 0) { |
|
51 | +//For every 100 posts |
|
51 | 52 | echo $post->id.". "; flush(); // print out where we are |
52 | 53 | //usleep(200000); |
53 | 54 | } |
54 | 55 | |
55 | - if ($post->id > $start_id){ |
|
56 | + if ($post->id > $start_id) { |
|
56 | 57 | fix_post($post); |
57 | 58 | } |
58 | 59 | } |
@@ -41,8 +41,7 @@ |
||
41 | 41 | function testquery($argstring) { |
42 | 42 | if (0) { |
43 | 43 | echo "WOULD DO: $argstring\n"; |
44 | - } |
|
45 | - else { |
|
44 | + } else { |
|
46 | 45 | _mysql_query($argstring); |
47 | 46 | } |
48 | 47 | return; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | start_table(); |
59 | 59 | table_header("ID", "Name", "Email", "Team", "Country", "Joined"); |
60 | 60 | |
61 | -while ($row = _mysql_fetch_object($result)) { |
|
61 | +while ($row = _mysql_fetch_object($result)) { |
|
62 | 62 | $id = $row->id; |
63 | 63 | $name = $row->name; |
64 | 64 | $email = $row->email_addr; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $email_validated = $row->email_validated; |
68 | 68 | |
69 | 69 | $team_name=""; |
70 | - if($row->teamid > 0){ |
|
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 |
||
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 | } |
@@ -97,8 +97,7 @@ discard block |
||
97 | 97 | $dt = $user->banished_until - time(); |
98 | 98 | if( $dt > 0 ) { |
99 | 99 | $x = "<span style=\"color: #ff0000\">Currently banished</span>"; |
100 | - } |
|
101 | - else { |
|
100 | + } else { |
|
102 | 101 | $x = "<span style=\"color: #ff9900\">Previously banished</span>"; |
103 | 102 | } |
104 | 103 | $roles .= $x; |
@@ -63,7 +63,8 @@ |
||
63 | 63 | printf("mean: %e<br>stdev: %e<br>samples: %d", $mean, $stdev, $count); |
64 | 64 | } |
65 | 65 | |
66 | -function show_stats_hist() { //deprecated |
|
66 | +function show_stats_hist() { |
|
67 | +//deprecated |
|
67 | 68 | global $hist; |
68 | 69 | global $quantum; |
69 | 70 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | set_time_limit(0); |
25 | 25 | |
26 | -function cache_check_diskspace2(){ |
|
26 | +function cache_check_diskspace2() { |
|
27 | 27 | $too_old = 86400; |
28 | 28 | while (1) { |
29 | 29 | $f = disk_free_space("../cache"); |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | } |
40 | 40 | $format = get_str("format", true); |
41 | 41 | |
42 | -if ($format=="xml"){ |
|
42 | +if ($format=="xml") { |
|
43 | 43 | // don't do caching for XML |
44 | 44 | xml_header(); |
45 | 45 | $retval = db_init_xml(); |
46 | 46 | if ($retval) xml_error($retval); |
47 | - if ($auth){ |
|
47 | + if ($auth) { |
|
48 | 48 | $user = BoincUser::lookup_auth($auth); |
49 | 49 | $show_hosts = true; |
50 | 50 | } else { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // |
61 | 61 | $cache_args="userid=".$id; |
62 | 62 | $cached_data = get_cached_data(USER_PAGE_TTL, $cache_args); |
63 | - if ($cached_data){ |
|
63 | + if ($cached_data) { |
|
64 | 64 | // We found some old but non-stale data, let's use it |
65 | 65 | $data = unserialize($cached_data); |
66 | 66 | $user = $data->user; |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | $preview = post_str("preview", true); |
54 | 54 | $warning = null; |
55 | 55 | |
56 | -if ($content && $title && (!$preview)){ |
|
57 | - if (post_str('add_signature', true) == "add_it"){ |
|
56 | +if ($content && $title && (!$preview)) { |
|
57 | + if (post_str('add_signature', true) == "add_it") { |
|
58 | 58 | $add_signature = true; // set a flag and concatenate later |
59 | - } else { |
|
59 | + } else { |
|
60 | 60 | $add_signature = false; |
61 | 61 | } |
62 | 62 | check_tokens($logged_in_user->authenticator); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>"; |
112 | 112 | } |
113 | 113 | |
114 | -if ($force_title && $title){ |
|
114 | +if ($force_title && $title) { |
|
115 | 115 | row2(tra("Title"), htmlspecialchars($title)."<input type=\"hidden\" name=\"title\" value=\"".htmlspecialchars($title)."\">"); |
116 | 116 | } else { |
117 | 117 | row2(tra("Title").$submit_help, |