@@ -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); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | $cache_args = "userid=$userid"; |
| 46 | 46 | $cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args); |
| 47 | -if ($cacheddata){ |
|
| 47 | +if ($cacheddata) { |
|
| 48 | 48 | // Already got a cached version of the information |
| 49 | 49 | $community_links_object = unserialize($cacheddata); |
| 50 | 50 | } else { |
@@ -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'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $userid = post_int('userid'); |
| 50 | 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,7 +65,7 @@ discard block |
||
| 65 | 65 | $mod_category = tra("Other"); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | -if (post_str('reason', true)){ |
|
| 68 | +if (post_str('reason', true)) { |
|
| 69 | 69 | start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason")); |
| 70 | 70 | } else { |
| 71 | 71 | start_vote($config,$logged_in_user,$user, $mod_category,"None given"); |
@@ -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); |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | // Action part |
| 52 | 52 | // |
| 53 | 53 | $success_page=0; |
| 54 | -if (get_str("submit",true)){ |
|
| 54 | +if (get_str("submit",true)) { |
|
| 55 | 55 | check_tokens($user->authenticator); |
| 56 | 56 | $reason = get_str("reason"); |
| 57 | - if (send_report_post_email($user, $forum, $thread, $post, $reason)){ |
|
| 57 | + if (send_report_post_email($user, $forum, $thread, $post, $reason)) { |
|
| 58 | 58 | $success_page=1; |
| 59 | 59 | } else { |
| 60 | 60 | echo "send email failed"; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | .tra("A moderator will now look at your report and decide what will happen - this may take a little while, so please be patient"); |
| 73 | 73 | |
| 74 | 74 | echo "<p><a href=\"forum_thread.php?id=$thread->id&postid=$post->id\">".tra("Return to thread")."</a>"; |
| 75 | -} elseif ($success_page==0){ |
|
| 75 | +} elseif ($success_page==0) { |
|
| 76 | 76 | page_head(tra("Report a forum post")); |
| 77 | 77 | if (!$no_forum_rating) { |
| 78 | 78 | echo "<p>".tra("Before reporting this post, consider using the +/- rating system instead. If enough users rate a post negatively it will eventually be hidden.<br />You can find the rating system at the bottom of the post.")."</p> |
@@ -52,7 +52,8 @@ |
||
| 52 | 52 | echo "<teams>\n"; |
| 53 | 53 | $total = 0; |
| 54 | 54 | foreach ($team_id_array as $team_id) { |
| 55 | - if (is_numeric($team_id)) { //make sure only numbers get through |
|
| 55 | + if (is_numeric($team_id)) { |
|
| 56 | +//make sure only numbers get through |
|
| 56 | 57 | $team = BoincTeam::lookup_id($team_id); |
| 57 | 58 | if ($team) { |
| 58 | 59 | show_team_xml($team); |
@@ -691,7 +691,8 @@ |
||
| 691 | 691 | <id>$result->id</id> |
| 692 | 692 | <state>".state_string($result)."</state> |
| 693 | 693 | "; |
| 694 | - if ($result->server_state == 5) { // over? |
|
| 694 | + if ($result->server_state == 5) { |
|
| 695 | +// over? |
|
| 695 | 696 | $paths = get_outfile_paths($result); |
| 696 | 697 | foreach($paths as $path) { |
| 697 | 698 | if (is_file($path)) { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | page_tail(); |
| 45 | 45 | exit; |
| 46 | 46 | } |
| 47 | - if (substr($user->authenticator, 0, 1) == 'x'){ |
|
| 47 | + if (substr($user->authenticator, 0, 1) == 'x') { |
|
| 48 | 48 | sleep(LOGIN_FAIL_SLEEP_SEC); |
| 49 | 49 | error_page("This account has been administratively disabled."); |
| 50 | 50 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | Please <a href=get_passwd.php>try again</a>. |
| 106 | 106 | "; |
| 107 | 107 | page_tail(); |
| 108 | - } else if (substr($user->authenticator, 0, 1) == 'x'){ |
|
| 108 | + } else if (substr($user->authenticator, 0, 1) == 'x') { |
|
| 109 | 109 | sleep(LOGIN_FAIL_SLEEP_SEC); |
| 110 | 110 | error_page("This account has been administratively disabled."); |
| 111 | 111 | } else { |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | $clause = "hostid=$hostid"; |
| 58 | 58 | page_head(tra("$s tasks for computer %1", $host->id)); |
| 59 | 59 | $show_host_link = false; |
| 60 | -} else if ($userid){ |
|
| 60 | +} else if ($userid) { |
|
| 61 | 61 | $user = get_logged_in_user(); |
| 62 | 62 | if ($userid != $user->id) { |
| 63 | 63 | error_page(tra("No access")); |