@@ -43,7 +43,7 @@ |
||
43 | 43 | $user = get_logged_in_user(); |
44 | 44 | |
45 | 45 | if ($choice == null && ($rating == null || $rating > 2 || $rating < -2)) { |
46 | - show_result_page(false, NULL, NULL, $choice); |
|
46 | + show_result_page(false, null, null, $choice); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | $post = BoincPost::lookup_id($post_id); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $user = BoincUser::lookup_id($userid); |
30 | 30 | if (!$user) error_page('no such user'); |
31 | 31 | $offset = get_int("offset", true); |
32 | -if (!$offset) $offset=0; |
|
32 | +if (!$offset) $offset = 0; |
|
33 | 33 | $items_per_page = 20; |
34 | 34 | |
35 | 35 | $logged_in_user = get_logged_in_user(false); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | break; |
115 | 115 | } |
116 | 116 | if ($n >= $offset) { |
117 | - show_post_and_context($post, $thread, $forum, $options, $n+1); |
|
117 | + show_post_and_context($post, $thread, $forum, $options, $n + 1); |
|
118 | 118 | } |
119 | 119 | $n++; |
120 | 120 | } |
@@ -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,10 +47,10 @@ 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 | if (!$user) error_page('No such user'); |
52 | 52 | |
53 | -if ($action!="start"){ |
|
53 | +if ($action != "start") { |
|
54 | 54 | error_page("Unknown action"); |
55 | 55 | } |
56 | 56 | |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | $mod_category = tra("Other"); |
67 | 67 | } |
68 | 68 | |
69 | -if (post_str('reason', true)){ |
|
70 | - start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason")); |
|
69 | +if (post_str('reason', true)) { |
|
70 | + start_vote($config, $logged_in_user, $user, $mod_category, post_str("reason")); |
|
71 | 71 | } else { |
72 | - start_vote($config,$logged_in_user,$user, $mod_category,"None given"); |
|
72 | + start_vote($config, $logged_in_user, $user, $mod_category, "None given"); |
|
73 | 73 | } |
74 | 74 | |
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'); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $user=BoincUser::lookup_id($userid); |
51 | 51 | if (!$user) error_page('No such user'); |
52 | 52 | |
53 | -if ($action!="start"){ |
|
53 | +if ($action!="start") { |
|
54 | 54 | error_page("Unknown action"); |
55 | 55 | } |
56 | 56 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $mod_category = tra("Other"); |
67 | 67 | } |
68 | 68 | |
69 | -if (post_str('reason', true)){ |
|
69 | +if (post_str('reason', true)) { |
|
70 | 70 | start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason")); |
71 | 71 | } else { |
72 | 72 | start_vote($config,$logged_in_user,$user, $mod_category,"None given"); |
@@ -30,6 +30,6 @@ |
||
30 | 30 | if (!$thread) error_page('No such thread'); |
31 | 31 | $logged_in_user = get_logged_in_user(); |
32 | 32 | |
33 | -$posts = get_thread_posts($threadid, 0,true); |
|
33 | +$posts = get_thread_posts($threadid, 0, true); |
|
34 | 34 | header("Location: forum_rate.php?choice=p&post=".$posts[0]->id); |
35 | 35 | ?> |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | start_table(); |
51 | 51 | |
52 | 52 | $get_reason = true; |
53 | -if (get_str('action')=="hide") { |
|
53 | +if (get_str('action') == "hide") { |
|
54 | 54 | //display input that selects reason |
55 | 55 | echo "<input type=hidden name=action value=hide>"; |
56 | 56 | row1(tra("Hide post")); |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | ) |
68 | 68 | ) |
69 | 69 | ); |
70 | -} elseif (get_str('action')=="move") { |
|
70 | +} elseif (get_str('action') == "move") { |
|
71 | 71 | row1(tra("Move post")); |
72 | 72 | echo "<input type=hidden name=action value=move>"; |
73 | 73 | row2(tra("Destination thread ID:"), "<input name=\"threadid\">"); |
74 | 74 | // TODO: display where to move the post as a dropdown instead of having to get ID |
75 | -} elseif (get_str('action')=="banish_user") { |
|
75 | +} elseif (get_str('action') == "banish_user") { |
|
76 | 76 | $userid = get_int('userid'); |
77 | 77 | $user = BoincUser::lookup_id($userid); |
78 | 78 | if (!$user) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | BoincForumPrefs::lookup($user); |
82 | 82 | $x = $user->prefs->banished_until; |
83 | - if ($x>time()) { |
|
83 | + if ($x > time()) { |
|
84 | 84 | error_page(tra("User is already banished")); |
85 | 85 | } |
86 | 86 | row1(tra("Banish user")); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | echo "<input type=\"hidden\" name=\"id\" value=\"".$postid."\">\n"; |
99 | 99 | echo "<input type=\"hidden\" name=\"userid\" value=\"".$userid."\">\n"; |
100 | 100 | echo "<input type=\"hidden\" name=\"confirmed\" value=\"yes\">\n"; |
101 | -} elseif (get_str('action')=="delete") { |
|
101 | +} elseif (get_str('action') == "delete") { |
|
102 | 102 | echo "<input type=hidden name=action value=delete>"; |
103 | 103 | row2( |
104 | 104 | "Are you sure want to delete this post? This cannot be undone.", |