@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | start_table(); |
42 | 42 | |
43 | 43 | $today = getdate(time()); |
44 | -$UOTD_heading = tra("User of the Day")." -- " . $today['month'] . " " . $today['mday'] . ", " . $today['year']; |
|
44 | +$UOTD_heading = tra("User of the Day")." -- ".$today['month']." ".$today['mday'].", ".$today['year']; |
|
45 | 45 | row1($UOTD_heading); |
46 | 46 | echo "<tr><td>"; |
47 | 47 | $profile = get_current_uotd(); |
@@ -59,15 +59,15 @@ discard block |
||
59 | 59 | row1(tra("User Profile Explorer")); |
60 | 60 | echo "<tr><td> |
61 | 61 | <ul> |
62 | - <li>".tra("View the %1 User Picture Gallery %2.", "<a href=\"" . url_base() . "user_profile/user_gallery_1.html\">", "</a>")."</li> |
|
63 | - <li>".tra("Browse profiles %1 by country %2.", "<a href=\"" . url_base() . "user_profile/profile_country.html\">", "</a>")."</li> |
|
62 | + <li>".tra("View the %1 User Picture Gallery %2.", "<a href=\"".url_base()."user_profile/user_gallery_1.html\">", "</a>")."</li> |
|
63 | + <li>".tra("Browse profiles %1 by country %2.", "<a href=\"".url_base()."user_profile/profile_country.html\">", "</a>")."</li> |
|
64 | 64 | <li>".tra("Browse profiles %1 at random %2, %3 at random with pictures %2, or %4 at random without pictures %2.", "<a href=\"?cmd=rand&pic=-1\">", "</a>", |
65 | 65 | "<a href=\"?cmd=rand&pic=1\">", "<a href=\"?cmd=rand&pic=0\">")."</li> |
66 | 66 | "; |
67 | -if (file_exists(PROFILE_PATH . "profile_alpha.html")) { |
|
67 | +if (file_exists(PROFILE_PATH."profile_alpha.html")) { |
|
68 | 68 | echo "<li>".tra("Alphabetical profile listings:")."<br>"; |
69 | 69 | |
70 | - include( PROFILE_PATH . "profile_alpha.html" ); |
|
70 | + include(PROFILE_PATH."profile_alpha.html"); |
|
71 | 71 | } |
72 | 72 | echo "</ul></td></tr>"; |
73 | 73 |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | // Optionally filters by forum, user, time, or hidden if specified. |
32 | 32 | // |
33 | 33 | function search_thread_titles( |
34 | - $keyword_list, $forum="", $user="", $time="", $limit=200, |
|
35 | - $sort_style=CREATE_TIME_NEW, $show_hidden = false |
|
36 | -){ |
|
37 | - $search_string="%"; |
|
34 | + $keyword_list, $forum = "", $user = "", $time = "", $limit = 200, |
|
35 | + $sort_style = CREATE_TIME_NEW, $show_hidden = false |
|
36 | +) { |
|
37 | + $search_string = "%"; |
|
38 | 38 | foreach ($keyword_list as $key => $word) { |
39 | 39 | $search_string .= BoincDb::escape_string($word)."%"; |
40 | 40 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (!$show_hidden) { |
52 | 52 | $query .= " and thread.hidden = 0"; |
53 | 53 | } |
54 | - switch($sort_style) { |
|
54 | + switch ($sort_style) { |
|
55 | 55 | case MODIFIED_NEW: |
56 | 56 | $query .= ' ORDER BY timestamp DESC'; |
57 | 57 | break; |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | // |
85 | 85 | function search_post_content( |
86 | 86 | $keyword_list, $forum, $user, $time, $limit, $sort_style, $show_hidden |
87 | -){ |
|
87 | +) { |
|
88 | 88 | $db = BoincDb::get(); |
89 | 89 | |
90 | - $search_string="%"; |
|
91 | - foreach ($keyword_list as $key => $word){ |
|
90 | + $search_string = "%"; |
|
91 | + foreach ($keyword_list as $key => $word) { |
|
92 | 92 | $search_string .= BoincDb::escape_string($word)."%"; |
93 | 93 | } |
94 | 94 | $optional_join = ""; |
@@ -100,20 +100,20 @@ discard block |
||
100 | 100 | } |
101 | 101 | $query = "select post.* from ".$db->db_name.".post".$optional_join." where content like '".$search_string."'"; |
102 | 102 | if ($forum) { |
103 | - $query.=" and forum = $forum->id"; |
|
103 | + $query .= " and forum = $forum->id"; |
|
104 | 104 | } |
105 | 105 | if ($user) { |
106 | - $query.=" and post.user = $user->id "; |
|
106 | + $query .= " and post.user = $user->id "; |
|
107 | 107 | } |
108 | 108 | if ($time) { |
109 | - $query.=" and post.timestamp > $time"; |
|
109 | + $query .= " and post.timestamp > $time"; |
|
110 | 110 | } |
111 | 111 | if (!$show_hidden) { |
112 | 112 | $query .= " AND post.hidden = 0"; |
113 | 113 | } |
114 | - switch($sort_style) { |
|
114 | + switch ($sort_style) { |
|
115 | 115 | case VIEWS_MOST: |
116 | - $query.= ' ORDER BY views DESC'; |
|
116 | + $query .= ' ORDER BY views DESC'; |
|
117 | 117 | break; |
118 | 118 | case CREATE_TIME_NEW: |
119 | 119 | $query .= ' ORDER by post.timestamp desc'; |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | $query .= ' ORDER BY post.timestamp DESC'; |
129 | 129 | break; |
130 | 130 | } |
131 | - $query.= " limit $limit"; |
|
131 | + $query .= " limit $limit"; |
|
132 | 132 | return BoincPost::enum_general($query); |
133 | 133 | } |
134 | 134 | |
135 | 135 | $logged_in_user = get_logged_in_user(false); |
136 | 136 | BoincForumPrefs::lookup($logged_in_user); |
137 | -if ($logged_in_user && $logged_in_user->prefs->privilege(S_MODERATOR)){ |
|
137 | +if ($logged_in_user && $logged_in_user->prefs->privilege(S_MODERATOR)) { |
|
138 | 138 | $show_hidden_posts = true; |
139 | 139 | } else { |
140 | 140 | $show_hidden_posts = false; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $search_max_time = post_int("search_max_time"); |
148 | 148 | $search_forum = post_int("search_forum"); |
149 | 149 | $search_sort = post_int("search_sort"); |
150 | -$search_list = explode(" ",$search_keywords); |
|
150 | +$search_list = explode(" ", $search_keywords); |
|
151 | 151 | if ($search_max_time) { |
152 | 152 | $min_timestamp = time() - ($search_max_time*3600*24); |
153 | 153 | } else { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | $limit = 100; |
158 | 158 | |
159 | -if ($search_forum==-1){ |
|
159 | +if ($search_forum == -1) { |
|
160 | 160 | $forum = null; |
161 | 161 | } else if ($search_forum) { |
162 | 162 | $forum = BoincForum::lookup_id($search_forum); |
@@ -173,11 +173,11 @@ discard block |
||
173 | 173 | |
174 | 174 | // Display the threads while we search for posts |
175 | 175 | // |
176 | -if (count($threads)){ |
|
177 | - echo "<h3>" . tra("Thread titles matching your query:") . "</h3>"; |
|
176 | +if (count($threads)) { |
|
177 | + echo "<h3>".tra("Thread titles matching your query:")."</h3>"; |
|
178 | 178 | start_table('table-striped'); |
179 | 179 | thread_list_header(); |
180 | - foreach ($threads as $thread){ |
|
180 | + foreach ($threads as $thread) { |
|
181 | 181 | if ($thread->hidden) continue; |
182 | 182 | thread_list_item($thread, $logged_in_user); |
183 | 183 | } |
@@ -193,8 +193,8 @@ discard block |
||
193 | 193 | $show_hidden_posts |
194 | 194 | ); |
195 | 195 | |
196 | -if (count($posts)){ |
|
197 | - echo "<h3>" . tra("Messages matching your query:") . "</h3>"; |
|
196 | +if (count($posts)) { |
|
197 | + echo "<h3>".tra("Messages matching your query:")."</h3>"; |
|
198 | 198 | start_table('table-striped'); |
199 | 199 | row_heading_array(['Info', 'Post'], ['', 'width=70%']); |
200 | 200 | $n = 1; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | end_table(); |
218 | 218 | } |
219 | 219 | |
220 | -if (!count($threads) && !count($posts)){ |
|
220 | +if (!count($threads) && !count($posts)) { |
|
221 | 221 | echo "<p>".tra("Sorry, couldn't find anything matching your search query. You can try to broaden your search by using less words (or less specific words).")."</p> |
222 | 222 | <p>" |
223 | 223 | .tra("You can also %1 try the same search on Google. %2", |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $parent_post_id = 0; |
57 | 57 | } |
58 | 58 | |
59 | -if ($filter != "false"){ |
|
59 | +if ($filter != "false") { |
|
60 | 60 | $filter = true; |
61 | 61 | } else { |
62 | 62 | $filter = false; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | $warning = null; |
74 | -if ($content && (!$preview)){ |
|
74 | +if ($content && (!$preview)) { |
|
75 | 75 | check_tokens($logged_in_user->authenticator); |
76 | 76 | if (!akismet_check($logged_in_user, $content)) { |
77 | 77 | $warning = tra("Your post has been flagged as spam by the Akismet anti-spam system. Please modify your text and try again."); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | -page_head(tra("Post to thread")." '$thread->title'",'','','', $bbcode_js); |
|
96 | +page_head(tra("Post to thread")." '$thread->title'", '', '', '', $bbcode_js); |
|
97 | 97 | |
98 | 98 | if ($parent_post) { |
99 | 99 | echo sprintf( |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $x2 .= " method=\"post\" name=\"post\" onsubmit=\"return checkForm(this)\">\n"; |
162 | 162 | $x2 .= form_tokens($logged_in_user->authenticator); |
163 | 163 | $x2 .= $bbcode_html."<textarea class=\"form-control\" name=\"content\" rows=\"18\">"; |
164 | - $no_quote = get_int("no_quote", true)==1; |
|
164 | + $no_quote = get_int("no_quote", true) == 1; |
|
165 | 165 | if ($preview) { |
166 | 166 | $x2 .= htmlspecialchars($content); |
167 | 167 | } else if (!$no_quote) { |
@@ -170,9 +170,9 @@ discard block |
||
170 | 170 | } |
171 | 171 | } |
172 | 172 | if (!$logged_in_user->prefs->no_signature_by_default) { |
173 | - $enable_signature='checked="true"'; |
|
173 | + $enable_signature = 'checked="true"'; |
|
174 | 174 | } else { |
175 | - $enable_signature=""; |
|
175 | + $enable_signature = ""; |
|
176 | 176 | } |
177 | 177 | $x2 .= sprintf('</textarea><p> </p> |
178 | 178 | <input class="btn btn-sm" %s type="submit" name="preview" value="%s"> |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | return sprintf( |
201 | 201 | 'In reply to %s\'s message of %s: |
202 | 202 | [quote]%s[/quote]', |
203 | - $user?$user->name:'unknown user', |
|
203 | + $user ? $user->name : 'unknown user', |
|
204 | 204 | date_str($post->timestamp), |
205 | 205 | htmlspecialchars($post->content) |
206 | 206 | ); |
@@ -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,10 +65,10 @@ 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 | 74 | ?> |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | $preview = post_str("preview", true); |
57 | 57 | $warning = null; |
58 | 58 | |
59 | -if ($content && $title && (!$preview)){ |
|
59 | +if ($content && $title && (!$preview)) { |
|
60 | 60 | if (post_str('add_signature', true)) { |
61 | - $add_signature = true; // set a flag and concatenate later |
|
62 | - } else { |
|
61 | + $add_signature = true; // set a flag and concatenate later |
|
62 | + } else { |
|
63 | 63 | $add_signature = false; |
64 | 64 | } |
65 | 65 | check_tokens($logged_in_user->authenticator); |
@@ -74,14 +74,14 @@ discard block |
||
74 | 74 | if (post_str('subscribe', true)) { |
75 | 75 | BoincSubscription::replace($logged_in_user->id, $thread->id); |
76 | 76 | } |
77 | - header('Location: forum_thread.php?id=' . $thread->id); |
|
77 | + header('Location: forum_thread.php?id='.$thread->id); |
|
78 | 78 | } else { |
79 | 79 | error_page("Can't create thread. $forum_error"); |
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | -page_head(tra("Create new thread"),'','','', $bbcode_js); |
|
84 | +page_head(tra("Create new thread"), '', '', '', $bbcode_js); |
|
85 | 85 | show_forum_header($logged_in_user); |
86 | 86 | |
87 | 87 | if ($warning) { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>"; |
123 | 123 | } |
124 | 124 | |
125 | -if ($force_title && $title){ |
|
125 | +if ($force_title && $title) { |
|
126 | 126 | row2( |
127 | 127 | tra("Title"), |
128 | 128 | sprintf( |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | row2( |
137 | 137 | tra("Title").$submit_help, |
138 | 138 | sprintf('<input type="text" class="form-control" name="title" value="%s">', |
139 | - $title?htmlspecialchars($title):'' |
|
139 | + $title ?htmlspecialchars($title) : '' |
|
140 | 140 | ), |
141 | 141 | null, FORUM_LH_PCT |
142 | 142 | ); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | sprintf( |
148 | 148 | '%s <textarea class="form-control" name="content" rows="12" cols="80">%s</textarea>', |
149 | 149 | $bbcode_html, |
150 | - $content?htmlspecialchars($content):'' |
|
150 | + $content ?htmlspecialchars($content) : '' |
|
151 | 151 | ), |
152 | 152 | null, FORUM_LH_PCT |
153 | 153 | ); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | if (!$logged_in_user->prefs->no_signature_by_default) { |
156 | 156 | $enable_signature = 'checked="true"'; |
157 | 157 | } else { |
158 | - $enable_signature=''; |
|
158 | + $enable_signature = ''; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | if (is_news_forum($forum)) { |
@@ -95,7 +95,7 @@ |
||
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.'"> |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | // ------------ Notification ----------- |
39 | 39 | |
40 | 40 | row1(tra("Notifications")); |
41 | -$ch0 = $user->prefs->pm_notification==0?"checked":""; |
|
42 | -$ch1 = $user->prefs->pm_notification==1?"checked":""; |
|
43 | -$ch2 = $user->prefs->pm_notification==2?"checked":""; |
|
41 | +$ch0 = $user->prefs->pm_notification == 0 ? "checked" : ""; |
|
42 | +$ch1 = $user->prefs->pm_notification == 1 ? "checked" : ""; |
|
43 | +$ch2 = $user->prefs->pm_notification == 2 ? "checked" : ""; |
|
44 | 44 | row2( |
45 | 45 | tra("How should we notify you of new private messages, friend requests, posts in subscribed threads, and other events?"), |
46 | 46 | "<input type=radio name=pm_notification value=0 $ch0> ".tra("On my Account page (no email)")." |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | // ------------ Forum identity ----------- |
54 | 54 | |
55 | 55 | $select_0 = $select_1 = $select_2 = ""; |
56 | -if (strlen($user->prefs->avatar)){ |
|
57 | - if (substr($user->prefs->avatar, 0, 23) == 'http://www.gravatar.com' || substr($user->prefs->avatar, 0, 18)=="//www.gravatar.com") { // Gravatar |
|
56 | +if (strlen($user->prefs->avatar)) { |
|
57 | + if (substr($user->prefs->avatar, 0, 23) == 'http://www.gravatar.com' || substr($user->prefs->avatar, 0, 18) == "//www.gravatar.com") { // Gravatar |
|
58 | 58 | $select_1 = "checked=\"true\""; |
59 | 59 | } else { |
60 | 60 | $select_2 = "checked=\"true\""; |
@@ -73,15 +73,15 @@ discard block |
||
73 | 73 | <input type=\"radio\" id=\"avatar_select_2\" name=\"avatar_select\" value=\"2\" ".$select_2."> |
74 | 74 | <label for=\"avatar_select_2\">".tra("Use this uploaded avatar:")."</label> <input type=\"file\" name=\"picture\">" |
75 | 75 | ); |
76 | -if (strlen($user->prefs->avatar)){ |
|
76 | +if (strlen($user->prefs->avatar)) { |
|
77 | 77 | row2(tra("Avatar preview")."<br><p class=\"text-muted\">".tra("This is how your avatar will look")."</p>", |
78 | 78 | "<img src=\"".$user->prefs->avatar."\" width=\"100\" height=\"100\">"); |
79 | 79 | } |
80 | 80 | |
81 | -$signature_by_default = $user->prefs->no_signature_by_default==false?"checked=\"checked\"":""; |
|
81 | +$signature_by_default = $user->prefs->no_signature_by_default == false ? "checked=\"checked\"" : ""; |
|
82 | 82 | |
83 | -$signature=$user->prefs->signature; |
|
84 | -$maxlen=250; |
|
83 | +$signature = $user->prefs->signature; |
|
84 | +$maxlen = 250; |
|
85 | 85 | $x = ''; |
86 | 86 | if (!NO_COMPUTING) { |
87 | 87 | $x = tra( |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | tra("Attach signature by default") |
104 | 104 | ) |
105 | 105 | ); |
106 | -if ($user->prefs->signature!=""){ |
|
106 | +if ($user->prefs->signature != "") { |
|
107 | 107 | row2(tra("Signature preview"). |
108 | 108 | "<br><p class=\"text-muted\">".tra("This is how your signature will look in the forums")."</p>", |
109 | 109 | output_transform($user->prefs->signature) |
@@ -112,13 +112,13 @@ discard block |
||
112 | 112 | |
113 | 113 | // ------------ Message display ----------- |
114 | 114 | |
115 | -$forum_hide_avatars = $user->prefs->hide_avatars?"checked=\"checked\"":""; |
|
116 | -$forum_hide_signatures = $user->prefs->hide_signatures?"checked=\"checked\"":""; |
|
117 | -$forum_link_popup = $user->prefs->link_popup?"checked=\"checked\"":""; |
|
118 | -$forum_image_as_link = $user->prefs->images_as_links?"checked=\"checked\"":""; |
|
119 | -$forum_jump_to_unread = $user->prefs->jump_to_unread?"checked=\"checked\"":""; |
|
120 | -$forum_ignore_sticky_posts = $user->prefs->ignore_sticky_posts?"checked=\"checked\"":""; |
|
121 | -$forum_highlight_special = $user->prefs->highlight_special?"checked=\"checked\"":""; |
|
115 | +$forum_hide_avatars = $user->prefs->hide_avatars ? "checked=\"checked\"" : ""; |
|
116 | +$forum_hide_signatures = $user->prefs->hide_signatures ? "checked=\"checked\"" : ""; |
|
117 | +$forum_link_popup = $user->prefs->link_popup ? "checked=\"checked\"" : ""; |
|
118 | +$forum_image_as_link = $user->prefs->images_as_links ? "checked=\"checked\"" : ""; |
|
119 | +$forum_jump_to_unread = $user->prefs->jump_to_unread ? "checked=\"checked\"" : ""; |
|
120 | +$forum_ignore_sticky_posts = $user->prefs->ignore_sticky_posts ? "checked=\"checked\"" : ""; |
|
121 | +$forum_highlight_special = $user->prefs->highlight_special ? "checked=\"checked\"" : ""; |
|
122 | 122 | |
123 | 123 | $forum_minimum_wrap_postcount = intval($user->prefs->minimum_wrap_postcount); |
124 | 124 | $forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | <input class="btn btn-default" type="submit" name="remove%d" value="%s"> |
165 | 165 | <br> |
166 | 166 | ', |
167 | - UNIQUE_USER_NAME?'':"$blocked_user->id -", |
|
167 | + UNIQUE_USER_NAME ? '' : "$blocked_user->id -", |
|
168 | 168 | user_links($blocked_user), |
169 | 169 | $blocked_user->id, |
170 | 170 | tra("Unblock") |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | tra("Blocked users"), |
179 | 179 | tra('Ignore message board posts and private messages from these users.') |
180 | 180 | ), |
181 | - $blocked_str?$blocked_str:'---' |
|
181 | + $blocked_str ? $blocked_str : '---' |
|
182 | 182 | ); |
183 | 183 | row2( |
184 | 184 | tra('Block user'), |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | <input type="text" name="forum_filter_user" size=12> |
189 | 189 | <input class="btn btn-default" type="submit" name="add_user_to_filter" value="%s"> |
190 | 190 | ', |
191 | - UNIQUE_USER_NAME?tra('User name'):tra('User ID (For instance: 123456789)'), |
|
191 | + UNIQUE_USER_NAME ?tra('User name') : tra('User ID (For instance: 123456789)'), |
|
192 | 192 | tra("Block") |
193 | 193 | ) |
194 | 194 | ); |
@@ -27,7 +27,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $subset = sanitize_tags(get_str("subset")); |
28 | 28 | $venue = sanitize_tags(get_str("venue", true)); |
29 | 29 | $columns = get_str("cols", true); |
30 | -$c = $columns?"&cols=$columns":""; |
|
30 | +$c = $columns ? "&cols=$columns" : ""; |
|
31 | 31 | check_subset($subset); |
32 | 32 | if ($action) { |
33 | 33 | check_tokens($user->authenticator); |