@@ -49,7 +49,7 @@ |
||
49 | 49 | $n = post_str("fraction_done_exact", true)?1:0; |
50 | 50 | $app->update("fraction_done_exact=$n"); |
51 | 51 | |
52 | - echo "Application $id updated. |
|
52 | + echo "application $id updated. |
|
53 | 53 | <p> |
54 | 54 | You must restart the project for this to take effect. |
55 | 55 | "; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $app = BoincApp::lookup_id($id); |
26 | 26 | if (!$app) admin_error_page("no such app"); |
27 | 27 | |
28 | - $n = post_str("deprecated", true)?1:0; |
|
28 | + $n = post_str("deprecated", true) ? 1 : 0; |
|
29 | 29 | $app->update("deprecated=$n"); |
30 | 30 | |
31 | 31 | $n = post_num("weight"); |
@@ -37,16 +37,16 @@ discard block |
||
37 | 37 | $n = post_int("target_nresults"); |
38 | 38 | $app->update("target_nresults=$n"); |
39 | 39 | |
40 | - $n = post_str("homogeneous_app_version", true)?1:0; |
|
40 | + $n = post_str("homogeneous_app_version", true) ? 1 : 0; |
|
41 | 41 | $app->update("homogeneous_app_version=$n"); |
42 | 42 | |
43 | - $n = post_str("non_cpu_intensive", true)?1:0; |
|
43 | + $n = post_str("non_cpu_intensive", true) ? 1 : 0; |
|
44 | 44 | $app->update("non_cpu_intensive=$n"); |
45 | 45 | |
46 | - $n = post_str("beta", true)?1:0; |
|
46 | + $n = post_str("beta", true) ? 1 : 0; |
|
47 | 47 | $app->update("beta=$n"); |
48 | 48 | |
49 | - $n = post_str("fraction_done_exact", true)?1:0; |
|
49 | + $n = post_str("fraction_done_exact", true) ? 1 : 0; |
|
50 | 50 | $app->update("fraction_done_exact=$n"); |
51 | 51 | |
52 | 52 | echo "Application $id updated. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | function add_app() { |
59 | 59 | $name = BoincDb::escape_string(post_str('add_name')); |
60 | 60 | $user_friendly_name = BoincDb::escape_string(post_str('add_user_friendly_name')); |
61 | - if (empty($name) || empty($user_friendly_name) ) { |
|
61 | + if (empty($name) || empty($user_friendly_name)) { |
|
62 | 62 | admin_error_page( |
63 | 63 | "To add a new application please supply both a brief name and a longer 'user-friendly' name.</font></p>" |
64 | 64 | ); |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | <h2>Edit applications</h2> |
82 | 82 | "; |
83 | 83 | |
84 | - $app_clause="deprecated=0"; |
|
85 | - $action_url="manage_apps.php"; |
|
86 | - if($all) { |
|
84 | + $app_clause = "deprecated=0"; |
|
85 | + $action_url = "manage_apps.php"; |
|
86 | + if ($all) { |
|
87 | 87 | $app_clause = ""; |
88 | - $action_url="manage_apps.php?all=1"; |
|
88 | + $action_url = "manage_apps.php?all=1"; |
|
89 | 89 | echo "<a href=\"manage_apps.php\">Don't show deprecated applications</a>"; |
90 | 90 | } else { |
91 | 91 | echo "<a href=\"manage_apps.php?all=1\">Show deprecated applications</a>"; |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | $apps = BoincApp::enum($app_clause); |
118 | 118 | foreach ($apps as $app) { |
119 | 119 | // grey-out deprecated versions |
120 | - $f1=$f2=''; |
|
121 | - if ($app->deprecated==1) { |
|
120 | + $f1 = $f2 = ''; |
|
121 | + if ($app->deprecated == 1) { |
|
122 | 122 | $f1 = "<font color='GREY'>"; |
123 | 123 | $f2 = "</font>"; |
124 | 124 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | echo " <TD align='left'>$f1<a href=app_details.php?appid=$app->id>$app->name</a><br> $app->user_friendly_name $f2</TD>\n"; |
130 | 130 | |
131 | - echo " <TD align='center'>$f1 " .date_str($app->create_time)."$f2</TD>\n"; |
|
131 | + echo " <TD align='center'>$f1 ".date_str($app->create_time)."$f2</TD>\n"; |
|
132 | 132 | |
133 | 133 | $v = $app->weight; |
134 | 134 | echo " <TD align='center'> |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | "; |
152 | 152 | |
153 | 153 | $v = ''; |
154 | - if ($app->homogeneous_app_version) $v=' CHECKED '; |
|
154 | + if ($app->homogeneous_app_version) $v = ' CHECKED '; |
|
155 | 155 | echo " <TD align='center'> |
156 | 156 | <input name='homogeneous_app_version' type='checkbox' $v></TD> |
157 | 157 | "; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | "X-Poedit-SourceCharset: utf-8\\n" |
37 | 37 | |
38 | 38 | |
39 | -HDR; |
|
39 | +hdr; |
|
40 | 40 | |
41 | 41 | $out = fopen("en.po", "w"); |
42 | 42 |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | $preview = post_str("preview", true); |
54 | 54 | $warning = null; |
55 | 55 | |
56 | -if ($content && $title && (!$preview)){ |
|
57 | - if (post_str('add_signature', true) == "add_it"){ |
|
56 | +if ($content && $title && (!$preview)) { |
|
57 | + if (post_str('add_signature', true) == "add_it") { |
|
58 | 58 | $add_signature = true; // set a flag and concatenate later |
59 | - } else { |
|
59 | + } else { |
|
60 | 60 | $add_signature = false; |
61 | 61 | } |
62 | 62 | check_tokens($logged_in_user->authenticator); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>"; |
112 | 112 | } |
113 | 113 | |
114 | -if ($force_title && $title){ |
|
114 | +if ($force_title && $title) { |
|
115 | 115 | row2(tra("Title"), htmlspecialchars($title)."<input type=\"hidden\" name=\"title\" value=\"".htmlspecialchars($title)."\">"); |
116 | 116 | } else { |
117 | 117 | row2(tra("Title").$submit_help, |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | $preview = post_str("preview", true); |
57 | 57 | $warning = null; |
58 | 58 | |
59 | -if ($content && $title && (!$preview)){ |
|
60 | - if (post_str('add_signature', true) == "add_it"){ |
|
61 | - $add_signature = true; // set a flag and concatenate later |
|
62 | - } else { |
|
59 | +if ($content && $title && (!$preview)) { |
|
60 | + if (post_str('add_signature', true) == "add_it") { |
|
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); |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | $title, $content, $logged_in_user, $forum, $add_signature, $export |
72 | 72 | ); |
73 | 73 | if ($thread) { |
74 | - header('Location: forum_thread.php?id=' . $thread->id); |
|
74 | + header('Location: forum_thread.php?id='.$thread->id); |
|
75 | 75 | } else { |
76 | 76 | error_page("Can't create thread. $forum_error"); |
77 | 77 | } |
78 | 78 | } |
79 | 79 | } |
80 | 80 | |
81 | -page_head(tra("Create new thread"),'','','', $bbcode_js); |
|
81 | +page_head(tra("Create new thread"), '', '', '', $bbcode_js); |
|
82 | 82 | show_forum_header($logged_in_user); |
83 | 83 | |
84 | 84 | if ($warning) { |
@@ -119,12 +119,12 @@ discard block |
||
119 | 119 | $submit_help = "<br /><font color=\"red\">".tra("Remember to add a title")."</font>"; |
120 | 120 | } |
121 | 121 | |
122 | -if ($force_title && $title){ |
|
122 | +if ($force_title && $title) { |
|
123 | 123 | row2(tra("Title"), htmlspecialchars($title)."<input type=\"hidden\" name=\"title\" value=\"".htmlspecialchars($title)."\">"); |
124 | 124 | } else { |
125 | 125 | row2(tra("Title").$submit_help, |
126 | 126 | sprintf('<input type="text" class="form-control" name="title" value="%s">', |
127 | - $title?htmlspecialchars($title):'' |
|
127 | + $title ?htmlspecialchars($title) : '' |
|
128 | 128 | ) |
129 | 129 | ); |
130 | 130 | } |
@@ -134,14 +134,14 @@ discard block |
||
134 | 134 | echo $bbcode_html; |
135 | 135 | end_table(); |
136 | 136 | echo sprintf('<textarea class="form-control" name="content" rows="12" cols="80">%s</textarea>', |
137 | - $content?htmlspecialchars($content):'' |
|
137 | + $content ?htmlspecialchars($content) : '' |
|
138 | 138 | ); |
139 | 139 | echo "</td></tr>"; |
140 | 140 | |
141 | 141 | if (!$logged_in_user->prefs->no_signature_by_default) { |
142 | - $enable_signature="checked=\"true\""; |
|
142 | + $enable_signature = "checked=\"true\""; |
|
143 | 143 | } else { |
144 | - $enable_signature=""; |
|
144 | + $enable_signature = ""; |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | if (is_news_forum($forum)) { |
@@ -157,5 +157,5 @@ discard block |
||
157 | 157 | |
158 | 158 | page_tail(); |
159 | 159 | |
160 | -$cvs_version_tracker[]="\$Id$"; |
|
160 | +$cvs_version_tracker[] = "\$Id$"; |
|
161 | 161 | ?> |
@@ -251,7 +251,7 @@ |
||
251 | 251 | $pid = file_get_contents($path); |
252 | 252 | if ($pid) { |
253 | 253 | $pid = trim($pid); |
254 | - $out = Array(); |
|
254 | + $out = array(); |
|
255 | 255 | exec("ps -ww $pid", $out); |
256 | 256 | foreach ($out as $y) { |
257 | 257 | if (strstr($y, (string)$pid)) return 1; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $avg = round($app->info->avg, 2); |
181 | 181 | $min = round($app->info->min, 2); |
182 | 182 | $max = round($app->info->max, 2); |
183 | - $x = $max?"$avg ($min - $max)":"---"; |
|
183 | + $x = $max ? "$avg ($min - $max)" : "---"; |
|
184 | 184 | $u = $app->info->users; |
185 | 185 | } else { |
186 | 186 | $x = '---'; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $cmd = trim($cmd); |
274 | 274 | $x = explode(" ", $cmd); |
275 | 275 | $prog = $x[0]; |
276 | - $pidname = $prog . '.pid'; |
|
276 | + $pidname = $prog.'.pid'; |
|
277 | 277 | } |
278 | 278 | $path = "../../pid_$host/$pidname"; |
279 | 279 | if (is_file($path)) { |
@@ -314,12 +314,12 @@ discard block |
||
314 | 314 | } |
315 | 315 | $master_host = $u["host"]; |
316 | 316 | if ($config->www_host) { |
317 | - $web_host = trim((string) $config->www_host); |
|
317 | + $web_host = trim((string)$config->www_host); |
|
318 | 318 | } else { |
319 | 319 | $web_host = $main_host; |
320 | 320 | } |
321 | 321 | if ($config->sched_host) { |
322 | - $sched_host = trim((string) $config->sched_host); |
|
322 | + $sched_host = trim((string)$config->sched_host); |
|
323 | 323 | } else { |
324 | 324 | $sched_host = $main_host; |
325 | 325 | } |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | |
330 | 330 | // the upload and download servers are sort of daemons too |
331 | 331 | // |
332 | - $url = trim((string) $config->download_url); |
|
332 | + $url = trim((string)$config->download_url); |
|
333 | 333 | $u = parse_url($url); |
334 | 334 | $h = $u["host"]; |
335 | 335 | if ($h == $master_host) { |
@@ -341,14 +341,14 @@ discard block |
||
341 | 341 | } else { |
342 | 342 | $have_remote = true; |
343 | 343 | } |
344 | - $url = trim((string) $config->upload_url); |
|
344 | + $url = trim((string)$config->upload_url); |
|
345 | 345 | $u = parse_url($url); |
346 | 346 | $h = $u["host"]; |
347 | 347 | if ($h == $master_host) { |
348 | 348 | $y = new StdClass; |
349 | 349 | $y->cmd = "Upload server"; |
350 | 350 | $y->host = $h; |
351 | - $y->status = !file_exists("../../stop_upload");; |
|
351 | + $y->status = !file_exists("../../stop_upload"); ; |
|
352 | 352 | $local_daemons[] = $y; |
353 | 353 | } else { |
354 | 354 | $have_remote = true; |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $y = new StdClass; |
361 | 361 | $y->cmd = "Scheduler"; |
362 | 362 | $y->host = $sched_host; |
363 | - $y->status = !file_exists("../../stop_sched");; |
|
363 | + $y->status = !file_exists("../../stop_sched"); ; |
|
364 | 364 | $local_daemons[] = $y; |
365 | 365 | } else { |
366 | 366 | $have_remote = true; |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $disabled_daemons[] = $x; |
377 | 377 | continue; |
378 | 378 | } |
379 | - $host = $d->host?(string)$d->host:$main_host; |
|
379 | + $host = $d->host ? (string)$d->host : $main_host; |
|
380 | 380 | if ($host != $web_host) { |
381 | 381 | $have_remote = true; |
382 | 382 | continue; |
@@ -369,7 +369,7 @@ |
||
369 | 369 | $text = "---"; |
370 | 370 | if ($batch->state == BATCH_STATE_COMPLETE) { |
371 | 371 | $y = '<font color="red">failed</font>'; |
372 | - } else { |
|
372 | + } else { |
|
373 | 373 | $y = "in progress"; |
374 | 374 | } |
375 | 375 | } |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | $wus = BoincWorkunit::enum("batch = $batch->id"); |
309 | 309 | $batch = get_batch_params($batch, $wus); |
310 | 310 | |
311 | - page_head("Batch $batch_id"); |
|
311 | + page_head("batch $batch_id"); |
|
312 | 312 | start_table(); |
313 | 313 | row2("name", $batch->name); |
314 | 314 | row2("application", $app->name); |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | $wu = BoincWorkunit::lookup_id($wuid); |
394 | 394 | if (!$wu) error_page("no such job"); |
395 | 395 | |
396 | - page_head("Job $wuid"); |
|
396 | + page_head("job $wuid"); |
|
397 | 397 | |
398 | 398 | echo " |
399 | 399 | <a href=workunit.php?wuid=$wuid>Workunit details</a> · |
@@ -412,9 +412,9 @@ discard block |
||
412 | 412 | "Canonical instance<br><small>click to see result page on BOINC server</smallp>", |
413 | 413 | "Download Results" |
414 | 414 | ); |
415 | - foreach($wus as $wu) { |
|
415 | + foreach ($wus as $wu) { |
|
416 | 416 | $resultid = $wu->canonical_resultid; |
417 | - $durl = boinc_get_wu_output_files_url($user,$wu->id); |
|
417 | + $durl = boinc_get_wu_output_files_url($user, $wu->id); |
|
418 | 418 | if ($resultid) { |
419 | 419 | $x = "<a href=result.php?resultid=$resultid>$resultid</a>"; |
420 | 420 | $y = '<font color="green">completed</font>'; |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $text = "---"; |
425 | 425 | if ($batch->state == BATCH_STATE_COMPLETE) { |
426 | 426 | $y = '<font color="red">failed</font>'; |
427 | - } else { |
|
427 | + } else { |
|
428 | 428 | $y = "in progress"; |
429 | 429 | } |
430 | 430 | } |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $results = BoincResult::enum("workunitid=$wuid"); |
490 | 490 | $upload_dir = parse_config(get_config(), "<upload_dir>"); |
491 | 491 | $fanout = parse_config(get_config(), "<uldl_dir_fanout>"); |
492 | - foreach($results as $result) { |
|
492 | + foreach ($results as $result) { |
|
493 | 493 | echo "<tr> |
494 | 494 | <td><a href=result.php?resultid=$result->id>$result->id · $result->name </a></td> |
495 | 495 | <td>".state_string($result)."</td> |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $view = BoltView::lookup_id($e->last_view_id); |
43 | 43 | $ago = time_diff(time() - $view->start_time); |
44 | 44 | $pct = number_format($view->fraction_done*100, 0); |
45 | - $status = "Started $start |
|
45 | + $status = "started $start |
|
46 | 46 | <br>Last visit: $ago ago |
47 | 47 | <br>$pct% done |
48 | 48 | "; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | if ($course->hidden && !($user->bolt->flags&BOLT_FLAG_SHOW_ALL)) { |
37 | 37 | continue; |
38 | 38 | } |
39 | - $e = $user?BoltEnrollment::lookup($user->id, $course->id):null; |
|
39 | + $e = $user ?BoltEnrollment::lookup($user->id, $course->id) : null; |
|
40 | 40 | if ($e) { |
41 | 41 | $start = date_str($e->create_time); |
42 | 42 | $view = BoltView::lookup_id($e->last_view_id); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $parent_post_id = 0; |
51 | 51 | } |
52 | 52 | |
53 | -if ($filter != "false"){ |
|
53 | +if ($filter != "false") { |
|
54 | 54 | $filter = true; |
55 | 55 | } else { |
56 | 56 | $filter = false; |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | $warning = null; |
68 | -if ($content && (!$preview)){ |
|
69 | - if (post_str('add_signature',true)=="add_it"){ |
|
68 | +if ($content && (!$preview)) { |
|
69 | + if (post_str('add_signature',true)=="add_it") { |
|
70 | 70 | $add_signature=true; // set a flag and concatenate later |
71 | - } else { |
|
71 | + } else { |
|
72 | 72 | $add_signature=false; |
73 | 73 | } |
74 | 74 | check_tokens($logged_in_user->authenticator); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $parent_post_id = 0; |
51 | 51 | } |
52 | 52 | |
53 | -if ($filter != "false"){ |
|
53 | +if ($filter != "false") { |
|
54 | 54 | $filter = true; |
55 | 55 | } else { |
56 | 56 | $filter = false; |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | $warning = null; |
68 | -if ($content && (!$preview)){ |
|
69 | - if (post_str('add_signature',true)=="add_it"){ |
|
70 | - $add_signature=true; // set a flag and concatenate later |
|
71 | - } else { |
|
72 | - $add_signature=false; |
|
68 | +if ($content && (!$preview)) { |
|
69 | + if (post_str('add_signature', true) == "add_it") { |
|
70 | + $add_signature = true; // set a flag and concatenate later |
|
71 | + } else { |
|
72 | + $add_signature = false; |
|
73 | 73 | } |
74 | 74 | check_tokens($logged_in_user->authenticator); |
75 | 75 | if (!akismet_check($logged_in_user, $content)) { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
91 | -page_head(tra("Post to thread"),'','','', $bbcode_js); |
|
91 | +page_head(tra("Post to thread"), '', '', '', $bbcode_js); |
|
92 | 92 | |
93 | 93 | show_forum_header($logged_in_user); |
94 | 94 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $x1 = tra("Message:").bbcode_info().post_warning(); |
143 | 143 | $x2 = ""; |
144 | 144 | if ($parent_post) { |
145 | - $x2 .=" ".tra("reply to %1 Message ID %2:", "<a href=#".$parent_post->id.">", " ".$parent_post->id."</a>"); |
|
145 | + $x2 .= " ".tra("reply to %1 Message ID %2:", "<a href=#".$parent_post->id.">", " ".$parent_post->id."</a>"); |
|
146 | 146 | } |
147 | 147 | $x2 .= "<form action=forum_reply.php?thread=".$thread->id; |
148 | 148 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $x2 .= " method=\"post\" name=\"post\" onsubmit=\"return checkForm(this)\">\n"; |
154 | 154 | $x2 .= form_tokens($logged_in_user->authenticator); |
155 | 155 | $x2 .= start_table_str().$bbcode_html.end_table_str()."<textarea class=\"form-control\" name=\"content\" rows=\"18\">"; |
156 | - $no_quote = get_int("no_quote", true)==1; |
|
156 | + $no_quote = get_int("no_quote", true) == 1; |
|
157 | 157 | if ($preview) { |
158 | 158 | $x2 .= htmlspecialchars($content); |
159 | 159 | } else if (!$no_quote) { |
@@ -162,9 +162,9 @@ discard block |
||
162 | 162 | } |
163 | 163 | } |
164 | 164 | if (!$logged_in_user->prefs->no_signature_by_default) { |
165 | - $enable_signature="checked=\"true\""; |
|
165 | + $enable_signature = "checked=\"true\""; |
|
166 | 166 | } else { |
167 | - $enable_signature=""; |
|
167 | + $enable_signature = ""; |
|
168 | 168 | } |
169 | 169 | $x2 .= "</textarea><p> </p> |
170 | 170 | <input class=\"btn btn-primary btn-sm \" type=\"submit\" name=\"preview\" value=\"".tra("Preview")."\"> |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | } |
180 | 180 | |
181 | 181 | function quote_text($text) { |
182 | - $text = "[quote]" . $text . "[/quote]"; |
|
182 | + $text = "[quote]".$text."[/quote]"; |
|
183 | 183 | return $text; |
184 | 184 | } |
185 | 185 | |
186 | -$cvs_version_tracker[]="\$Id$"; |
|
186 | +$cvs_version_tracker[] = "\$Id$"; |
|
187 | 187 | ?> |
@@ -32,7 +32,7 @@ |
||
32 | 32 | if (!$batch || $batch->user_id != $user->id) { |
33 | 33 | error_page("no batch"); |
34 | 34 | } |
35 | - page_head("Batch $batch->id"); |
|
35 | + page_head("batch $batch->id"); |
|
36 | 36 | $results = BoincResult::enum("batch=$batch->id order by workunitid"); |
37 | 37 | result_table_start(true, true, null); |
38 | 38 | foreach ($results as $result) { |
@@ -53,8 +53,9 @@ 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") { |
|
58 | +// Gravatar |
|
58 | 59 | $select_1 = "checked=\"true\""; |
59 | 60 | } else { |
60 | 61 | $select_2 = "checked=\"true\""; |
@@ -73,7 +74,7 @@ discard block |
||
73 | 74 | <input type=\"radio\" id=\"avatar_select_2\" name=\"avatar_select\" value=\"2\" ".$select_2."> |
74 | 75 | <label for=\"avatar_select_2\">".tra("Use this uploaded avatar:")."</label> <input type=\"file\" name=\"picture\">" |
75 | 76 | ); |
76 | -if (strlen($user->prefs->avatar)){ |
|
77 | +if (strlen($user->prefs->avatar)) { |
|
77 | 78 | row2(tra("Avatar preview")."<br><p class=\"text-muted\">".tra("This is how your avatar will look")."</p>", |
78 | 79 | "<img src=\"".$user->prefs->avatar."\" width=\"100\" height=\"100\">"); |
79 | 80 | } |
@@ -92,7 +93,7 @@ discard block |
||
92 | 93 | textarea_with_counter("signature", 250, $signature) |
93 | 94 | ."<br><input type=\"checkbox\" name=\"signature_by_default\" ".$signature_by_default."> ".tra("Attach signature by default") |
94 | 95 | ); |
95 | -if ($user->prefs->signature!=""){ |
|
96 | +if ($user->prefs->signature!="") { |
|
96 | 97 | row2(tra("Signature preview"). |
97 | 98 | "<br><p class=\"text-muted\">".tra("This is how your signature will look in the forums")."</p>", |
98 | 99 | output_transform($user->prefs->signature) |
@@ -138,7 +139,7 @@ discard block |
||
138 | 139 | |
139 | 140 | $filtered_userlist = get_ignored_list($user); |
140 | 141 | $forum_filtered_userlist = ""; |
141 | -for ($i=0; $i<sizeof($filtered_userlist); $i++){ |
|
142 | +for ($i=0; $i<sizeof($filtered_userlist); $i++) { |
|
142 | 143 | $id = (int)$filtered_userlist[$i]; |
143 | 144 | if ($id) { |
144 | 145 | $filtered_user = BoincUser::lookup_id($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 | row2( |
86 | 86 | tra("Signature for message board posts") |
87 | 87 | .bbcode_info() |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | textarea_with_counter("signature", 250, $signature) |
93 | 93 | ."<br><input type=\"checkbox\" name=\"signature_by_default\" ".$signature_by_default."> ".tra("Attach signature by default") |
94 | 94 | ); |
95 | -if ($user->prefs->signature!=""){ |
|
95 | +if ($user->prefs->signature != "") { |
|
96 | 96 | row2(tra("Signature preview"). |
97 | 97 | "<br><p class=\"text-muted\">".tra("This is how your signature will look in the forums")."</p>", |
98 | 98 | output_transform($user->prefs->signature) |
@@ -101,13 +101,13 @@ discard block |
||
101 | 101 | |
102 | 102 | // ------------ Message display ----------- |
103 | 103 | |
104 | -$forum_hide_avatars = $user->prefs->hide_avatars?"checked=\"checked\"":""; |
|
105 | -$forum_hide_signatures = $user->prefs->hide_signatures?"checked=\"checked\"":""; |
|
106 | -$forum_link_popup = $user->prefs->link_popup?"checked=\"checked\"":""; |
|
107 | -$forum_image_as_link = $user->prefs->images_as_links?"checked=\"checked\"":""; |
|
108 | -$forum_jump_to_unread = $user->prefs->jump_to_unread?"checked=\"checked\"":""; |
|
109 | -$forum_ignore_sticky_posts = $user->prefs->ignore_sticky_posts?"checked=\"checked\"":""; |
|
110 | -$forum_highlight_special = $user->prefs->highlight_special?"checked=\"checked\"":""; |
|
104 | +$forum_hide_avatars = $user->prefs->hide_avatars ? "checked=\"checked\"" : ""; |
|
105 | +$forum_hide_signatures = $user->prefs->hide_signatures ? "checked=\"checked\"" : ""; |
|
106 | +$forum_link_popup = $user->prefs->link_popup ? "checked=\"checked\"" : ""; |
|
107 | +$forum_image_as_link = $user->prefs->images_as_links ? "checked=\"checked\"" : ""; |
|
108 | +$forum_jump_to_unread = $user->prefs->jump_to_unread ? "checked=\"checked\"" : ""; |
|
109 | +$forum_ignore_sticky_posts = $user->prefs->ignore_sticky_posts ? "checked=\"checked\"" : ""; |
|
110 | +$forum_highlight_special = $user->prefs->highlight_special ? "checked=\"checked\"" : ""; |
|
111 | 111 | |
112 | 112 | $forum_minimum_wrap_postcount = intval($user->prefs->minimum_wrap_postcount); |
113 | 113 | $forum_display_wrap_postcount = intval($user->prefs->display_wrap_postcount); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | $filtered_userlist = get_ignored_list($user); |
140 | 140 | $forum_filtered_userlist = ""; |
141 | -for ($i=0; $i<sizeof($filtered_userlist); $i++){ |
|
141 | +for ($i = 0; $i < sizeof($filtered_userlist); $i++) { |
|
142 | 142 | $id = (int)$filtered_userlist[$i]; |
143 | 143 | if ($id) { |
144 | 144 | $filtered_user = BoincUser::lookup_id($id); |
@@ -168,5 +168,5 @@ discard block |
||
168 | 168 | end_table(); |
169 | 169 | page_tail(); |
170 | 170 | |
171 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
171 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
172 | 172 | ?> |