Passed
Push — dpa_banish ( 03707c )
by David
08:51
created
html/user/forum_search_action.php 1 patch
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 function search_thread_titles(
34 34
     $keyword_list, $forum="", $user="", $time="", $limit=200,
35 35
     $sort_style=CREATE_TIME_NEW, $show_hidden = false
36
-){
36
+) {
37 37
     $search_string="%";
38 38
     foreach ($keyword_list as $key => $word) {
39 39
         $search_string .= BoincDb::escape_string($word)."%";
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
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 90
     $search_string="%";
91
-    foreach ($keyword_list as $key => $word){
91
+    foreach ($keyword_list as $key => $word) {
92 92
         $search_string .= BoincDb::escape_string($word)."%";
93 93
     }
94 94
     $optional_join = "";
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
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;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
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);
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
 
177 177
 // Display the threads
178 178
 //
179
-if (count($threads)){
179
+if (count($threads)) {
180 180
     echo "<h3>" . tra("Thread titles matching your query:") . "</h3>";
181 181
     start_table('table-striped');
182 182
     thread_list_header();
183
-    foreach ($threads as $thread){
183
+    foreach ($threads as $thread) {
184 184
         if (!$show_hidden_posts) {
185 185
             $u = BoincUser::lookup_id($thread->owner);
186 186
             if ($u && is_banished($u)) continue;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     $show_hidden_posts
201 201
 );
202 202
 
203
-if (count($posts)){
203
+if (count($posts)) {
204 204
     echo "<h3>" . tra("Messages matching your query:") . "</h3>";
205 205
     start_table('table-striped');
206 206
     row_heading_array(['Info', 'Post'], ['', 'width=70%']);
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     end_table();
229 229
 }
230 230
 
231
-if (!count($threads) && !count($posts)){
231
+if (!count($threads) && !count($posts)) {
232 232
     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>
233 233
     <p>"
234 234
     .tra("You can also %1 try the same search on Google. %2",
Please login to merge, or discard this patch.