@@ -23,15 +23,15 @@ |
||
23 | 23 | admin_page_head("Account Ownership Keys"); |
24 | 24 | |
25 | 25 | if (!file_exists($account_ownership_private_key_file_path)) { |
26 | - echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
26 | + echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
27 | 27 | } else { |
28 | - echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>"; |
|
28 | + echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>"; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | if (!file_exists($account_ownership_public_key_file_path)) { |
32 | - echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
32 | + echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
33 | 33 | } else { |
34 | - echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>"; |
|
34 | + echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>"; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | echo "<p>For more info see the related wiki page: <a href=\"https://github.com/BOINC/boinc/wiki/ProofOfOwnership\">ProofOfOwnership</a></p>"; |
@@ -23,15 +23,15 @@ |
||
23 | 23 | admin_page_head("Account Ownership Keys"); |
24 | 24 | |
25 | 25 | if (!file_exists($account_ownership_private_key_file_path)) { |
26 | - echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
26 | + echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
27 | 27 | } else { |
28 | - echo "<p>The account ownership private key '" . $account_ownership_private_key_file_name . "' exists.</p>"; |
|
28 | + echo "<p>The account ownership private key '".$account_ownership_private_key_file_name."' exists.</p>"; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | if (!file_exists($account_ownership_public_key_file_path)) { |
32 | - echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
32 | + echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' <b>doesn't</b> exist. Please run the 'generate_account_ownership_keys.php' script from the command line in the BOINC web server ops directory.</p>"; |
|
33 | 33 | } else { |
34 | - echo "<p>The account ownership public key '" . $account_ownership_public_key_file_name . "' exists.</p>"; |
|
34 | + echo "<p>The account ownership public key '".$account_ownership_public_key_file_name."' exists.</p>"; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | echo "<p>For more info see the related wiki page: <a href=\"https://github.com/BOINC/boinc/wiki/ProofOfOwnership\">ProofOfOwnership</a></p>"; |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | require_once('../inc/sanitize_html.inc'); |
27 | 27 | |
28 | 28 | class output_options { |
29 | - var $bb2html; // BBCode as HTML? (on) |
|
30 | - var $images_as_links; // Images as hyperlinks? (off) |
|
31 | - var $link_popup; // Links in new windows? (off) |
|
32 | - var $nl2br; // Convert newlines to <br>'s? (on) |
|
33 | - var $htmlitems; // Convert special chars to HTML entities? (on) |
|
34 | - var $htmlscrub; // Scrub "bad" HTML tags? (off) |
|
35 | - var $highlight_terms;// Array of terms to be highlighted (off) |
|
29 | + var $bb2html; // BBCode as HTML? (on) |
|
30 | + var $images_as_links; // Images as hyperlinks? (off) |
|
31 | + var $link_popup; // Links in new windows? (off) |
|
32 | + var $nl2br; // Convert newlines to <br>'s? (on) |
|
33 | + var $htmlitems; // Convert special chars to HTML entities? (on) |
|
34 | + var $htmlscrub; // Scrub "bad" HTML tags? (off) |
|
35 | + var $highlight_terms; // Array of terms to be highlighted (off) |
|
36 | 36 | |
37 | 37 | // Constructor - set the defaults. |
38 | 38 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $options = new output_options; // Defaults in the class definition |
69 | 69 | } |
70 | 70 | if ($options->htmlitems) { |
71 | - $text = htmlspecialchars($text, ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE); |
|
71 | + $text = htmlspecialchars($text, ENT_COMPAT|ENT_HTML401|ENT_SUBSTITUTE); |
|
72 | 72 | } |
73 | 73 | if (is_array($options->highlight_terms)) { |
74 | 74 | $text = highlight_terms($text, $options->highlight_terms); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | if ($export) { |
110 | 110 | $text = preg_replace_callback( |
111 | 111 | "@\[pre\](.*?)\[/pre\]@is", |
112 | - function ($matches) { |
|
112 | + function($matches) { |
|
113 | 113 | $x = remove_br(substr($matches[0], 5, -6)); |
114 | 114 | $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false); |
115 | 115 | $x = str_replace("[", "[", $x); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | ); |
120 | 120 | return preg_replace_callback( |
121 | 121 | "@\[code\](.*?)\[/code\]@is", |
122 | - function ($matches) { |
|
122 | + function($matches) { |
|
123 | 123 | $x = remove_br(substr($matches[0], 6, -7)); |
124 | 124 | $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false); |
125 | 125 | $x = str_replace("[", "[", $x); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } else { |
131 | 131 | $text = preg_replace_callback( |
132 | 132 | "@\[pre\](.*?)\[/pre\]@is", |
133 | - function ($matches) { |
|
133 | + function($matches) { |
|
134 | 134 | $x = remove_br(substr($matches[0], 5, -6)); |
135 | 135 | $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false); |
136 | 136 | $x = str_replace("[", "[", $x); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ); |
141 | 141 | return preg_replace_callback( |
142 | 142 | "@\[code\](.*?)\[/code\]@is", |
143 | - function ($matches) { |
|
143 | + function($matches) { |
|
144 | 144 | $x = remove_br(substr($matches[0], 6, -7)); |
145 | 145 | $x = htmlspecialchars($x, ENT_COMPAT, "UTF-8", false); |
146 | 146 | $x = str_replace("[", "[", $x); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | |
154 | -function bb2html($text, $export=false) { |
|
154 | +function bb2html($text, $export = false) { |
|
155 | 155 | $urlregex = "(?:\"?)(?:(http\:\/\/)?)([^\[\"<\ ]+)(?:\"?)"; |
156 | 156 | // NOTE: |
157 | 157 | // This matches https:// too; I don't understand why. |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | |
172 | 172 | $httpsregex = "(?:\"?)https\:\/\/([^\[\"<\ ]+)(?:\"?)"; |
173 | 173 | // List of allowable tags |
174 | - $bbtags = array ( |
|
174 | + $bbtags = array( |
|
175 | 175 | "@\[b\](.*?)\[/b\]@is", |
176 | 176 | "@\[i\](.*?)\[/i\]@is", |
177 | 177 | "@\[u\](.*?)\[/u\]@is", |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | // What the above tags are turned in to |
202 | 202 | if ($export) { |
203 | - $htmltags = array ( |
|
203 | + $htmltags = array( |
|
204 | 204 | "<b>\\1</b>", |
205 | 205 | "<i>\\1</i>", |
206 | 206 | "<u>\\1</u>", |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | "<a href=\"https://github.com/BOINC/boinc/wiki/\\1\">\\1</a>", |
228 | 228 | ); |
229 | 229 | } else { |
230 | - $htmltags = array ( |
|
230 | + $htmltags = array( |
|
231 | 231 | "<b>\\1</b>", |
232 | 232 | "<i>\\1</i>", |
233 | 233 | "<u>\\1</u>", |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | $lasttext = ""; |
260 | 260 | $i = 0; |
261 | 261 | // $i<1000 to prevent DoS |
262 | - while ($text != $lasttext && $i<1000) { |
|
262 | + while ($text != $lasttext && $i < 1000) { |
|
263 | 263 | $lasttext = $text; |
264 | 264 | $text = replace_pre_code($text, $export); |
265 | 265 | $text = preg_replace($bbtags, $htmltags, $text); |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | // for example inside <pre> containers |
275 | 275 | // The original \n was retained after the br when it was added |
276 | 276 | // |
277 | -function remove_br($text){ |
|
277 | +function remove_br($text) { |
|
278 | 278 | return str_replace("<br />", "", $text); |
279 | 279 | } |
280 | 280 | |
@@ -282,19 +282,19 @@ discard block |
||
282 | 282 | // |
283 | 283 | function externalize_links($text) { |
284 | 284 | // TODO: Convert this to PCRE |
285 | - $i=0; |
|
286 | - $linkpos=true; |
|
285 | + $i = 0; |
|
286 | + $linkpos = true; |
|
287 | 287 | $out = ""; |
288 | - while (true){ |
|
288 | + while (true) { |
|
289 | 289 | //Find a link |
290 | 290 | // |
291 | - $linkpos=strpos($text, "<a ", $i); |
|
292 | - if ($linkpos===false) break; |
|
291 | + $linkpos = strpos($text, "<a ", $i); |
|
292 | + if ($linkpos === false) break; |
|
293 | 293 | |
294 | 294 | //Replace with target='_new' |
295 | 295 | // |
296 | - $out .= substr($text, $i, $linkpos-$i)."<a target=\"_new\" "; |
|
297 | - $i = $linkpos+3; |
|
296 | + $out .= substr($text, $i, $linkpos - $i)."<a target=\"_new\" "; |
|
297 | + $i = $linkpos + 3; |
|
298 | 298 | } |
299 | 299 | $out .= substr($text, $i); |
300 | 300 | return $out; |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | |
303 | 303 | // Converts image tags to links to the images. |
304 | 304 | |
305 | -function image_as_link($text){ |
|
305 | +function image_as_link($text) { |
|
306 | 306 | /* This function depends on sanitized HTML */ |
307 | 307 | // Build some regex (should be a *lot* faster) |
308 | 308 | $pattern = '@<img([\S\s]+?)src=([^>]+?)>@si'; |
@@ -327,5 +327,5 @@ discard block |
||
327 | 327 | } |
328 | 328 | } |
329 | 329 | |
330 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
330 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
331 | 331 | ?> |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | define("FORUM_QA_MERGED_MODE", true); |
58 | 58 | // Set to true to merge Message boards and Q&A section |
59 | -define ("DISABLE_PROFILES", true); |
|
59 | +define("DISABLE_PROFILES", true); |
|
60 | 60 | // enable profiles only after enabling reCAPTCHA |
61 | 61 | // https://github.com/BOINC/boinc/wiki/ProtectionFromSpam |
62 | 62 | define("USE_STOPFORUMSPAM", true); |
@@ -193,15 +193,15 @@ discard block |
||
193 | 193 | </ol>", PROJECT); |
194 | 194 | } |
195 | 195 | |
196 | -function project_workunit($wu){ |
|
196 | +function project_workunit($wu) { |
|
197 | 197 | // shown in the workunit page |
198 | 198 | } |
199 | 199 | |
200 | -function project_user_summary($user){ |
|
200 | +function project_user_summary($user) { |
|
201 | 201 | // shown in the user summary page |
202 | 202 | } |
203 | 203 | |
204 | -function project_user_page_private($user){ |
|
204 | +function project_user_page_private($user) { |
|
205 | 205 | // shown in the private account page |
206 | 206 | } |
207 | 207 | |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | array("name" => "Uppercase", "short_name" => "UC", "appids" => array(1, 25)), |
276 | 276 | ); |
277 | 277 | |
278 | -function project_user_credit($user){ |
|
278 | +function project_user_credit($user) { |
|
279 | 279 | global $sub_projects; |
280 | 280 | foreach ($sub_projects as $sp) { |
281 | 281 | show_app_credit_user($user, $sp["name"], $sp["appids"]); |