@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | $post_owner = BoincUser::lookup_id($post->user); |
44 | 44 | if (($logged_in_user->id != $post_owner->id) || (can_reply($thread, $forum, $logged_in_user) == false)) { |
45 | - error_page (tra("You are not authorized to edit this post.")); |
|
45 | + error_page(tra("You are not authorized to edit this post.")); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | $thread_owner = BoincUser::lookup_id($thread->owner); |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | // (ie. not a response to another post) |
52 | 52 | // allow the user to modify the thread title |
53 | 53 | // |
54 | -$can_edit_title = ($post->parent_post==0 && $thread_owner->id==$logged_in_user->id && !is_banished($logged_in_user)); |
|
54 | +$can_edit_title = ($post->parent_post == 0 && $thread_owner->id == $logged_in_user->id && !is_banished($logged_in_user)); |
|
55 | 55 | |
56 | 56 | $content = post_str("content", true); |
57 | 57 | $title = post_str("title", true); |
58 | 58 | $preview = post_str("preview", true); |
59 | 59 | |
60 | -if (post_str('submit',true) && (!$preview)) { |
|
60 | +if (post_str('submit', true) && (!$preview)) { |
|
61 | 61 | if (POST_MAX_LINKS |
62 | 62 | && link_count($content) > POST_MAX_LINKS |
63 | 63 | && !is_moderator($logged_in_user, $forum) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | check_tokens($logged_in_user->authenticator); |
68 | 68 | |
69 | - $add_signature = (post_str('add_signature', true) == "1")?1:0; |
|
69 | + $add_signature = (post_str('add_signature', true) == "1") ? 1 : 0; |
|
70 | 70 | $content = substr($content, 0, 64000); |
71 | 71 | $content = trim($content); |
72 | 72 | if (strlen($content)) { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $now = time(); |
75 | 75 | $post->update("signature=$add_signature, content='$content', modified=$now"); |
76 | 76 | |
77 | - if ($can_edit_title){ |
|
77 | + if ($can_edit_title) { |
|
78 | 78 | $title = trim($title); |
79 | 79 | $title = sanitize_tags($title); |
80 | 80 | $title = BoincDb::escape_string($title); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
90 | -page_head(tra("Edit post"),'','','', $bbcode_js); |
|
90 | +page_head(tra("Edit post"), '', '', '', $bbcode_js); |
|
91 | 91 | |
92 | 92 | switch ($forum->parent_type) { |
93 | 93 | case 0: |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | sprintf( |
123 | 123 | '<input type="text" size=%d name="title" value="%s">', |
124 | 124 | 80, |
125 | - htmlspecialchars($preview?$title:$thread->title) |
|
125 | + htmlspecialchars($preview ? $title : $thread->title) |
|
126 | 126 | ), |
127 | 127 | null, FORUM_LH_PCT |
128 | 128 | ); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $bbcode_html, |
140 | 140 | 12, |
141 | 141 | 80, |
142 | - htmlspecialchars($preview?$content:$post->content) |
|
142 | + htmlspecialchars($preview ? $content : $post->content) |
|
143 | 143 | ), |
144 | 144 | null, FORUM_LH_PCT |
145 | 145 | ); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | '<input id="add_signature" name="add_signature" value="1" type="checkbox" %s> |
150 | 150 | <label for="add_signature">%s</label> |
151 | 151 | ', |
152 | - $post->signature?'checked="true"':'', |
|
152 | + $post->signature ? 'checked="true"' : '', |
|
153 | 153 | tra("Add my signature to this post") |
154 | 154 | ), |
155 | 155 | null, FORUM_LH_PCT |
@@ -170,5 +170,5 @@ discard block |
||
170 | 170 | |
171 | 171 | page_tail(); |
172 | 172 | |
173 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
173 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
174 | 174 | ?> |
@@ -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,11 +200,11 @@ 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 | ); |
207 | 207 | } |
208 | 208 | |
209 | -$cvs_version_tracker[]="\$Id$"; |
|
209 | +$cvs_version_tracker[] = "\$Id$"; |
|
210 | 210 | ?> |
@@ -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", |
@@ -228,5 +228,5 @@ discard block |
||
228 | 228 | echo "<p><a href=\"forum_search.php\">".tra("Perform another search")."</a></p>"; |
229 | 229 | page_tail(); |
230 | 230 | |
231 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
231 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
232 | 232 | ?> |
@@ -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)) { |
@@ -195,5 +195,5 @@ discard block |
||
195 | 195 | |
196 | 196 | page_tail(); |
197 | 197 | |
198 | -$cvs_version_tracker[]="\$Id$"; |
|
198 | +$cvs_version_tracker[] = "\$Id$"; |
|
199 | 199 | ?> |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | project_forum_index_intro(); |
70 | 70 | } |
71 | 71 | |
72 | - if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){ |
|
72 | + if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) { |
|
73 | 73 | $categories = BoincCategory::enum("true order by orderID"); |
74 | 74 | } else { |
75 | 75 | echo "<p>" |
@@ -210,5 +210,5 @@ discard block |
||
210 | 210 | } else { |
211 | 211 | main($user); |
212 | 212 | } |
213 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
213 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
214 | 214 | ?> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | // show a forum. |
27 | 27 | // $user is null if not logged in |
28 | 28 | // |
29 | -function forum_page($forum, $user, $msg=null) { |
|
29 | +function forum_page($forum, $user, $msg = null) { |
|
30 | 30 | global $forum_sort_styles; |
31 | 31 | |
32 | 32 | if (DISABLE_FORUMS) { |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | |
54 | 54 | if (!$sort_style) { |
55 | 55 | // get the sort style either from the logged in user or a cookie |
56 | - if ($user){ |
|
56 | + if ($user) { |
|
57 | 57 | $sort_style = $user->prefs->forum_sorting; |
58 | 58 | } else { |
59 | 59 | list($sort_style, $thread_style) = parse_forum_cookie(); |
60 | 60 | } |
61 | 61 | } else { |
62 | 62 | // set the sort style |
63 | - if ($user){ |
|
63 | + if ($user) { |
|
64 | 64 | $user->prefs->forum_sorting = $sort_style; |
65 | 65 | $user->prefs->update("forum_sorting=$sort_style"); |
66 | 66 | } else { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | echo "<td><a href=\"forum_thread.php?id=$thread->id\">$title</a><br></td>"; |
249 | 249 | |
250 | 250 | echo ' |
251 | - <td>'.($thread->replies+1).'</td> |
|
251 | + <td>'.($thread->replies + 1).'</td> |
|
252 | 252 | <td>'.user_links($owner, BADGE_HEIGHT_SMALL).'</td> |
253 | 253 | <td>'.$thread->views.'</td> |
254 | 254 | <td>'.time_diff_str($thread->timestamp, time()).'</td> |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | flush(); |
258 | 258 | } |
259 | 259 | end_table(); |
260 | - echo "<br>$page_nav"; // show page links |
|
260 | + echo "<br>$page_nav"; // show page links |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | $id = get_int("id"); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return $x; |
52 | 52 | } |
53 | 53 | |
54 | -function pm_team_form($user, $teamid, $error=null) { |
|
54 | +function pm_team_form($user, $teamid, $error = null) { |
|
55 | 55 | global $bbcode_html, $bbcode_js; |
56 | 56 | $team = BoincTeam::lookup_id($teamid); |
57 | 57 | if (!$team) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | error_page("not admin"); |
62 | 62 | } |
63 | 63 | |
64 | - page_head(tra("Send message to team"),'','','', $bbcode_js); |
|
64 | + page_head(tra("Send message to team"), '', '', '', $bbcode_js); |
|
65 | 65 | |
66 | 66 | $subject = post_str("subject", true); |
67 | 67 | $content = post_str("content", true); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | function pm_form_page($replyto, $userid, $error = null) { |
114 | 114 | global $bbcode_html, $bbcode_js; |
115 | 115 | global $g_logged_in_user; |
116 | - page_head(tra("Send private message"),'','','', $bbcode_js); |
|
116 | + page_head(tra("Send private message"), '', '', '', $bbcode_js); |
|
117 | 117 | |
118 | 118 | if (post_str("preview", true) == tra("Preview")) { |
119 | 119 | $content = post_str("content", true); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | if (!$user) { |
138 | 138 | error_page("Sender no longer exists"); |
139 | 139 | } |
140 | - $writeto = UNIQUE_USER_NAME?$user->name:$userid." (".$user->name.")"; |
|
140 | + $writeto = UNIQUE_USER_NAME ? $user->name : $userid." (".$user->name.")"; |
|
141 | 141 | $subject = $message->subject; |
142 | 142 | if (substr($subject, 0, 3) != "re:") { |
143 | 143 | $subject = "re: ".$subject; |
@@ -147,15 +147,15 @@ discard block |
||
147 | 147 | if (!$user) { |
148 | 148 | error_page("Sender no longer exists"); |
149 | 149 | } |
150 | - $writeto = UNIQUE_USER_NAME?$user->name:$userid." (".$user->name.")"; |
|
150 | + $writeto = UNIQUE_USER_NAME ? $user->name : $userid." (".$user->name.")"; |
|
151 | 151 | } else { |
152 | 152 | $writeto = sanitize_tags(post_str("to", true)); |
153 | 153 | $subject = post_str("subject", true); |
154 | 154 | $content = post_str("content", true); |
155 | 155 | } |
156 | 156 | |
157 | - $content = $content?htmlspecialchars($content):''; |
|
158 | - $subject = $subject?htmlspecialchars($subject):''; |
|
157 | + $content = $content ?htmlspecialchars($content) : ''; |
|
158 | + $subject = $subject ?htmlspecialchars($subject) : ''; |
|
159 | 159 | |
160 | 160 | if ($error != null) { |
161 | 161 | echo "<p class=\"text-danger\">".$error."</p>\n"; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | function send_pm_notification_email( |
212 | 212 | $logged_in_user, $to_user, $subject, $content |
213 | 213 | ) { |
214 | - $message = " |
|
214 | + $message = " |
|
215 | 215 | You have received a new private message at ".PROJECT.". |
216 | 216 | |
217 | 217 | From: $logged_in_user->name (ID $logged_in_user->id) |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $pm = BoincPrivateMessage::lookup_id($notify->opaque); |
242 | 242 | $from_user = BoincUser::lookup_id($pm->senderid); |
243 | 243 | if (!$pm || !$from_user) return null; |
244 | - return "<a href=pm.php>".tra("Private message%1 from %2, subject:" , "</a>", $from_user->name )." $pm->subject"; |
|
244 | + return "<a href=pm.php>".tra("Private message%1 from %2, subject:", "</a>", $from_user->name)." $pm->subject"; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | function pm_send_msg($from_user, $to_user, $subject, $content, $send_email) { |
@@ -305,11 +305,11 @@ discard block |
||
305 | 305 | |
306 | 306 | function pm_email_remind($user) { |
307 | 307 | if (!$user->prefs->pm_notification) { |
308 | - return "<br><small>" . |
|
308 | + return "<br><small>". |
|
309 | 309 | tra( |
310 | 310 | "For email notification, %1 edit community prefs %2", |
311 | 311 | '<a href="edit_forum_preferences_form.php">', '</a>' |
312 | - ) . |
|
312 | + ). |
|
313 | 313 | "</small>" |
314 | 314 | ; |
315 | 315 | } |
@@ -335,5 +335,5 @@ discard block |
||
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
338 | -$cvs_version_tracker[]="\$Id: pm.inc 14019 2007-11-01 23:04:39Z davea $"; |
|
338 | +$cvs_version_tracker[] = "\$Id: pm.inc 14019 2007-11-01 23:04:39Z davea $"; |
|
339 | 339 | ?> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if (!$user->has_profile) return null; |
72 | 72 | $profile = BoincProfile::lookup("userid=$user->id"); |
73 | 73 | if (!$profile->has_picture) return null; |
74 | - if (profile_screening() && $profile->verification!=1) return null; |
|
74 | + if (profile_screening() && $profile->verification != 1) return null; |
|
75 | 75 | return profile_thumb_url($user->id); |
76 | 76 | } |
77 | 77 | |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | return $image; |
126 | 126 | } |
127 | 127 | |
128 | - ($origWidth > $origHeight)? $scalar = ($origWidth / $targetWidth) : $scalar = ($origHeight / $targetHeight); |
|
128 | + ($origWidth > $origHeight) ? $scalar = ($origWidth/$targetWidth) : $scalar = ($origHeight/$targetHeight); |
|
129 | 129 | |
130 | 130 | if ($scalar != 0) { |
131 | - $destWidth = $origWidth / $scalar; |
|
132 | - $destHeight = $origHeight / $scalar; |
|
131 | + $destWidth = $origWidth/$scalar; |
|
132 | + $destHeight = $origHeight/$scalar; |
|
133 | 133 | } else { |
134 | 134 | $destWidth = $origWidth; |
135 | 135 | $destHeight = $origHeight; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $gd_info = gd_info(); |
139 | 139 | $v = $gd_info["GD Version"]; |
140 | 140 | $v = explode('.', $v); |
141 | - $v = (int)$v[0]; // major version |
|
141 | + $v = (int)$v[0]; // major version |
|
142 | 142 | if ($v >= 2) { |
143 | 143 | // If you are using a modern PHP/GD installation that does |
144 | 144 | // 'truecolor' images, this is what's needed. |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $options->htmlitems = false; |
182 | 182 | $temp = output_transform($profile->response1, $options); |
183 | 183 | $temp = sanitize_tags($temp); |
184 | - $description = "(\"" . sub_sentence($temp, ' ', MAX_DESC_LENGTH, true) . "\")"; |
|
184 | + $description = "(\"".sub_sentence($temp, ' ', MAX_DESC_LENGTH, true)."\")"; |
|
185 | 185 | |
186 | 186 | } |
187 | 187 | |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | function check_whether_to_show_profile($user, $logged_in_user) { |
193 | 193 | $min_credit = parse_config(get_config(), "<profile_min_credit>"); |
194 | - if (!$logged_in_user && $min_credit && $user->expavg_credit < $min_credit ) { |
|
194 | + if (!$logged_in_user && $min_credit && $user->expavg_credit < $min_credit) { |
|
195 | 195 | error_page( |
196 | 196 | tra("To prevent spam, profiles of users with an average credit of less than %1 are displayed only to logged-in users. We apologize for this inconvenience.", $min_credit) |
197 | 197 | ); |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | // |
230 | 230 | $show_picture = $profile->has_picture; |
231 | 231 | if (profile_screening()) { |
232 | - if (!$screen_mode && !$can_edit && $profile->verification!=1) { |
|
232 | + if (!$screen_mode && !$can_edit && $profile->verification != 1) { |
|
233 | 233 | $show_picture = false; |
234 | 234 | } |
235 | 235 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | // yet verified. This will tell them if other users can't view it yet, or |
246 | 246 | // if there is a problem with it and they need to replace it. |
247 | 247 | // |
248 | - if (profile_screening() && $profile->has_picture && $can_edit && $profile->verification!=1) { |
|
248 | + if (profile_screening() && $profile->has_picture && $can_edit && $profile->verification != 1) { |
|
249 | 249 | row1(offensive_profile_warning($profile->verification)); |
250 | 250 | } |
251 | 251 | |
@@ -278,6 +278,6 @@ discard block |
||
278 | 278 | } |
279 | 279 | } |
280 | 280 | |
281 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
281 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
282 | 282 | |
283 | 283 | ?> |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | if ($n === false) return ''; |
34 | 34 | $m = strpos($p, ']', $n); |
35 | 35 | if ($m === false) return ''; |
36 | - $x = substr($p, $n+5, $m-$n-5); |
|
36 | + $x = substr($p, $n + 5, $m - $n - 5); |
|
37 | 37 | |
38 | 38 | $n = strpos($x, ' '); |
39 | 39 | if ($n !== false) return substr($x, 0, $n); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | if ($n === false) return ''; |
48 | 48 | $m = strpos($p, ']', $n); |
49 | 49 | if ($m === false) return ''; |
50 | - $x = substr($p, $n+5, $m-$n-5); |
|
50 | + $x = substr($p, $n + 5, $m - $n - 5); |
|
51 | 51 | $n = strpos($x, '_'); |
52 | 52 | if ($n !== false) return substr($x, 0, $n); |
53 | 53 | $n = strpos($x, 'r'); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | function main() { |
59 | 59 | global $max_days; |
60 | - $t = time()-$max_days*86400; |
|
60 | + $t = time() - $max_days*86400; |
|
61 | 61 | $hosts = BoincHost::enum("rpc_time>$t"); |
62 | 62 | $descs = []; |
63 | 63 | foreach ($hosts as $host) { |