@@ -22,7 +22,7 @@ |
||
22 | 22 | $languages = get_supported_languages(); |
23 | 23 | $lang = sanitize_tags(get_str("lang", true)); |
24 | 24 | |
25 | -if (!in_array($lang, $languages) && $lang!="auto" && $lang!="en") { |
|
25 | +if (!in_array($lang, $languages) && $lang != "auto" && $lang != "en") { |
|
26 | 26 | echo "Language $lang is not supported"; |
27 | 27 | } else { |
28 | 28 | send_cookie('lang', $lang, true); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $lang = sanitize_tags(get_str("lang", true)); |
24 | 24 | |
25 | 25 | if (!in_array($lang, $languages) && $lang!="auto" && $lang!="en") { |
26 | - echo "Language $lang is not supported"; |
|
26 | + echo "language $lang is not supported"; |
|
27 | 27 | } else { |
28 | 28 | send_cookie('lang', $lang, true); |
29 | 29 | header('Location: index.php'); |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | $userid = get_int("userid", true); |
38 | 38 | $offset = get_int("offset", true); |
39 | 39 | $appid = get_int("appid", true); |
40 | -if (!$offset) $offset=0; |
|
40 | +if (!$offset) $offset = 0; |
|
41 | 41 | $state = get_int("state", true); |
42 | -if (!$state) $state=0; |
|
42 | +if (!$state) $state = 0; |
|
43 | 43 | $show_names = get_int("show_names", true); |
44 | -if (!$show_names) $show_names=0; |
|
44 | +if (!$show_names) $show_names = 0; |
|
45 | 45 | |
46 | 46 | $s = $state_name[$state]; |
47 | 47 | if ($appid) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $clause = "hostid=$hostid"; |
58 | 58 | page_head(tra("$s tasks for computer %1", $host->id)); |
59 | 59 | $show_host_link = false; |
60 | -} else if ($userid){ |
|
60 | +} else if ($userid) { |
|
61 | 61 | $user = get_logged_in_user(); |
62 | 62 | if ($userid != $user->id) { |
63 | 63 | error_page(tra("No access")); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | error_page(tra("Missing user ID or host ID")); |
70 | 70 | } |
71 | 71 | |
72 | -$clause2 = $clause. $state_clause[$state]; |
|
72 | +$clause2 = $clause.$state_clause[$state]; |
|
73 | 73 | if ($appid) { |
74 | 74 | $clause2 .= ' AND appid='.$appid; |
75 | 75 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } else { |
80 | 80 | $order_clause = "order by sent_time desc"; |
81 | 81 | } |
82 | -$query = "$clause2 $order_clause limit $offset,".($results_per_page+1); |
|
82 | +$query = "$clause2 $order_clause limit $offset,".($results_per_page + 1); |
|
83 | 83 | $results = BoincResult::enum($query); |
84 | 84 | |
85 | 85 | $info = new StdClass; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | $clause = "hostid=$hostid"; |
58 | 58 | page_head(tra("$s tasks for computer %1", $host->id)); |
59 | 59 | $show_host_link = false; |
60 | -} else if ($userid){ |
|
60 | +} else if ($userid) { |
|
61 | 61 | $user = get_logged_in_user(); |
62 | 62 | if ($userid != $user->id) { |
63 | 63 | error_page(tra("No access")); |
@@ -112,10 +112,10 @@ discard block |
||
112 | 112 | $apps = BoincApp::enum("deprecated=0"); |
113 | 113 | foreach ($apps as $app) { |
114 | 114 | $us = BoincUserSubmitApp::lookup("user_id=$user_id and app_id=$app->id"); |
115 | - $checked = $us?"checked":""; |
|
115 | + $checked = $us ? "checked" : ""; |
|
116 | 116 | echo "<br> <input type=checkbox name=app_$app->id $checked> $app->name\n"; |
117 | 117 | } |
118 | - $q = (string) $usub->quota; |
|
118 | + $q = (string)$usub->quota; |
|
119 | 119 | $mj = $usub->max_jobs_in_progress; |
120 | 120 | echo " |
121 | 121 | <p> |
@@ -151,11 +151,11 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | } |
154 | - $quota = (double) get_str('quota'); |
|
154 | + $quota = (double)get_str('quota'); |
|
155 | 155 | if ($quota != $us->quota) { |
156 | 156 | $us->update("quota=$quota"); |
157 | 157 | } |
158 | - $mj = (int) get_str('max_jobs_in_progress'); |
|
158 | + $mj = (int)get_str('max_jobs_in_progress'); |
|
159 | 159 | if ($mj != $us->max_jobs_in_progress) { |
160 | 160 | $us->update("max_jobs_in_progress=$mj"); |
161 | 161 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $subset = sanitize_tags(get_str("subset")); |
28 | 28 | $venue = sanitize_tags(get_str("venue")); |
29 | 29 | $columns = get_int("cols", true); |
30 | -$c = $columns?"&cols=$columns":""; |
|
30 | +$c = $columns ? "&cols=$columns" : ""; |
|
31 | 31 | check_venue($venue); |
32 | 32 | check_subset($subset); |
33 | 33 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $title = tra("Edit %1 preferences", subset_name($subset)); |
41 | 41 | if ($venue) $title = "$title for $venue"; |
42 | 42 | page_head($title); |
43 | - $x = $venue?"&venue=$venue":""; |
|
43 | + $x = $venue ? "&venue=$venue" : ""; |
|
44 | 44 | |
45 | 45 | echo PREFS_FORM_DESC1; |
46 | 46 | echo PREFS_FORM_ERROR_DESC; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $title = tra("Edit %1 preferences", subset_name($subset)); |
65 | 65 | if ($venue) $title = "$title for $venue"; |
66 | 66 | page_head($title); |
67 | - $x = $venue?"&venue=$venue":""; |
|
67 | + $x = $venue ? "&venue=$venue" : ""; |
|
68 | 68 | |
69 | 69 | echo PREFS_FORM_ERROR_DESC; |
70 | 70 | |
@@ -90,5 +90,5 @@ discard block |
||
90 | 90 | print_prefs_form("add", $subset, $venue, $user, $prefs, $columns); |
91 | 91 | } |
92 | 92 | page_tail(); |
93 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
93 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
94 | 94 | ?> |
@@ -82,7 +82,7 @@ |
||
82 | 82 | echo "<rpc_response>\n"; |
83 | 83 | echo "<count>$count</count>\n"; |
84 | 84 | echo "<threads>\n"; |
85 | - foreach($threads as $thread) { |
|
85 | + foreach ($threads as $thread) { |
|
86 | 86 | echo "<thread>\n"; |
87 | 87 | echo " <id>$thread->id</id>\n"; |
88 | 88 | echo " <forumid>$thread->forum</forumid>\n"; |
@@ -29,7 +29,7 @@ discard block |
||
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") { |
@@ -56,5 +56,5 @@ discard block |
||
56 | 56 | page_tail(); |
57 | 57 | } |
58 | 58 | |
59 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
59 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
60 | 60 | ?> |
@@ -38,7 +38,7 @@ |
||
38 | 38 | // See if "action" is provided - either through post or get |
39 | 39 | if (!post_str('action', true)) { |
40 | 40 | if (!get_str('action', true)){ |
41 | - error_page(tra("You must specify an action...")); |
|
41 | + error_page(tra("You must specify an action...")); |
|
42 | 42 | } else { |
43 | 43 | $action = get_str('action'); |
44 | 44 | } |
@@ -55,14 +55,14 @@ |
||
55 | 55 | |
56 | 56 | // TODO: create a function for this in forum_banishment_vote.inc to make it more flexible |
57 | 57 | switch (post_int("category", true)) { |
58 | - case 1: |
|
59 | - $mod_category = tra("Obscene"); |
|
60 | - case 2: |
|
61 | - $mod_category = tra("Flame/Hate mail"); |
|
62 | - case 3: |
|
63 | - $mod_category = tra("User Request"); |
|
64 | - default: |
|
65 | - $mod_category = tra("Other"); |
|
58 | +case 1: |
|
59 | + $mod_category = tra("Obscene"); |
|
60 | +case 2: |
|
61 | + $mod_category = tra("Flame/Hate mail"); |
|
62 | +case 3: |
|
63 | + $mod_category = tra("User Request"); |
|
64 | +default: |
|
65 | + $mod_category = tra("Other"); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | if (post_str('reason', true)){ |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | // See if "action" is provided - either through post or get |
39 | 39 | if (!post_str('action', true)) { |
40 | - if (!get_str('action', true)){ |
|
40 | + if (!get_str('action', true)) { |
|
41 | 41 | error_page(tra("You must specify an action...")); |
42 | 42 | } else { |
43 | 43 | $action = get_str('action'); |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | $userid = post_int('userid'); |
50 | -$user=BoincUser::lookup_id($userid); |
|
50 | +$user = BoincUser::lookup_id($userid); |
|
51 | 51 | |
52 | -if ($action!="start"){ |
|
52 | +if ($action != "start") { |
|
53 | 53 | error_page("Unknown action"); |
54 | 54 | } |
55 | 55 | |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | $mod_category = tra("Other"); |
66 | 66 | } |
67 | 67 | |
68 | -if (post_str('reason', true)){ |
|
69 | - start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason")); |
|
68 | +if (post_str('reason', true)) { |
|
69 | + start_vote($config, $logged_in_user, $user, $mod_category, post_str("reason")); |
|
70 | 70 | } else { |
71 | - start_vote($config,$logged_in_user,$user, $mod_category,"None given"); |
|
71 | + start_vote($config, $logged_in_user, $user, $mod_category, "None given"); |
|
72 | 72 | } |
73 | 73 | |
74 | -$cvs_version_tracker[]="\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis $"; //Generated automatically - do not edit |
|
74 | +$cvs_version_tracker[] = "\$Id: forum_moderate_post_action.php 13718 2007-09-30 11:17:11Z Rytis $"; //Generated automatically - do not edit |
|
75 | 75 | ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | // See if "action" is provided - either through post or get |
39 | 39 | if (!post_str('action', true)) { |
40 | - if (!get_str('action', true)){ |
|
40 | + if (!get_str('action', true)) { |
|
41 | 41 | error_page(tra("You must specify an action...")); |
42 | 42 | } else { |
43 | 43 | $action = get_str('action'); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $userid = post_int('userid'); |
50 | 50 | $user=BoincUser::lookup_id($userid); |
51 | 51 | |
52 | -if ($action!="start"){ |
|
52 | +if ($action!="start") { |
|
53 | 53 | error_page("Unknown action"); |
54 | 54 | } |
55 | 55 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $mod_category = tra("Other"); |
66 | 66 | } |
67 | 67 | |
68 | -if (post_str('reason', true)){ |
|
68 | +if (post_str('reason', true)) { |
|
69 | 69 | start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason")); |
70 | 70 | } else { |
71 | 71 | start_vote($config,$logged_in_user,$user, $mod_category,"None given"); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | $userid = get_int("userid"); |
29 | 29 | $offset = get_int("offset", true); |
30 | -if (!$offset) $offset=0; |
|
30 | +if (!$offset) $offset = 0; |
|
31 | 31 | $items_per_page = 20; |
32 | 32 | |
33 | 33 | $user = BoincUser::lookup_id($userid); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | break; |
113 | 113 | } |
114 | 114 | if ($n >= $offset) { |
115 | - show_post_and_context($post, $thread, $forum, $options, $n+1); |
|
115 | + show_post_and_context($post, $thread, $forum, $options, $n + 1); |
|
116 | 116 | } |
117 | 117 | $n++; |
118 | 118 | } |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | if ($forum->parent_type == 1) { |
92 | 92 | // post to team msg board |
93 | 93 | if ($forum->category == $teamid) { |
94 | - if ($thread->hidden && !$show_team_hidden) { |
|
95 | - continue; |
|
96 | - } |
|
94 | + if ($thread->hidden && !$show_team_hidden) { |
|
95 | + continue; |
|
96 | + } |
|
97 | 97 | if ($post->hidden && !$show_team_hidden) { |
98 | 98 | continue; |
99 | 99 | } |
@@ -101,18 +101,18 @@ discard block |
||
101 | 101 | continue; |
102 | 102 | } |
103 | 103 | } else { |
104 | - if ($thread->hidden && !$show_hidden) { |
|
105 | - continue; |
|
106 | - } |
|
104 | + if ($thread->hidden && !$show_hidden) { |
|
105 | + continue; |
|
106 | + } |
|
107 | 107 | if ($post->hidden && !$show_hidden) { |
108 | 108 | continue; |
109 | 109 | } |
110 | 110 | } |
111 | 111 | } |
112 | - if ($n == $offset + $items_per_page) { |
|
113 | - $show_next = true; |
|
114 | - break; |
|
115 | - } |
|
112 | + if ($n == $offset + $items_per_page) { |
|
113 | + $show_next = true; |
|
114 | + break; |
|
115 | + } |
|
116 | 116 | if ($n >= $offset) { |
117 | 117 | show_post_and_context($post, $thread, $forum, $options, $n+1); |
118 | 118 | } |
@@ -121,12 +121,12 @@ discard block |
||
121 | 121 | end_table(); |
122 | 122 | |
123 | 123 | if ($offset) { |
124 | - $x = $offset - $items_per_page; |
|
124 | + $x = $offset - $items_per_page; |
|
125 | 125 | echo "<a href=forum_user_posts.php?userid=$userid&offset=$x> |
126 | 126 | <b>".tra("Previous %1", $items_per_page)."</b> |
127 | 127 | </a> |
128 | 128 | "; |
129 | - if ($show_next) echo " · "; |
|
129 | + if ($show_next) echo " · "; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | if ($show_next) { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | $users = BoincUser::enum("teamid=$team->id"); |
50 | 50 | $ninactive_users = 0; |
51 | -foreach($users as $user) { |
|
51 | +foreach ($users as $user) { |
|
52 | 52 | if ($user->id == $logged_in_user->id) continue; |
53 | 53 | if ($user->id == $team->userid) continue; |
54 | 54 | $user_total_credit = format_credit($user->total_credit); |