@@ -148,6 +148,6 @@ |
||
148 | 148 | |
149 | 149 | page_tail(); |
150 | 150 | |
151 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
151 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
152 | 152 | |
153 | 153 | ?> |
@@ -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 { |
@@ -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 { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $url = sanitize_tags(get_str("url")); |
46 | -$type_name = sanitize_tags(get_str("type")); // textual |
|
46 | +$type_name = sanitize_tags(get_str("type")); // textual |
|
47 | 47 | $type = team_type_num($type_name); |
48 | 48 | $name_html = get_str("name_html"); |
49 | 49 | $description = get_str("description"); |
@@ -28,10 +28,10 @@ |
||
28 | 28 | |
29 | 29 | $border = get_str("border", true); |
30 | 30 | |
31 | -if ($border=="no") { |
|
31 | +if ($border == "no") { |
|
32 | 32 | $border = 0; |
33 | 33 | } else { |
34 | - $border=8; |
|
34 | + $border = 8; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $credit = credit_string($user->total_credit, false); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | $field = get_str("field"); |
24 | 24 | |
25 | -switch($field) { |
|
25 | +switch ($field) { |
|
26 | 26 | case "result_server_state": |
27 | 27 | page_head(tra("Server states")); |
28 | 28 | echo " |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | // Object-caching and full-file caching is used to speed up queries |
24 | 24 | // for data from this page. |
25 | 25 | |
26 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
26 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
27 | 27 | |
28 | 28 | require_once("../inc/cache.inc"); |
29 | 29 | require_once("../inc/util.inc"); |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | } |
40 | 40 | $format = get_str("format", true); |
41 | 41 | |
42 | -if ($format=="xml"){ |
|
42 | +if ($format == "xml") { |
|
43 | 43 | // don't do caching for XML |
44 | 44 | xml_header(); |
45 | 45 | $retval = db_init_xml(); |
46 | 46 | if ($retval) xml_error($retval); |
47 | - if ($auth){ |
|
47 | + if ($auth) { |
|
48 | 48 | $user = BoincUser::lookup_auth($auth); |
49 | 49 | $show_hosts = true; |
50 | 50 | } else { |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | // The page may be presented in many different languages, |
59 | 59 | // so here we cache the data instead |
60 | 60 | // |
61 | - $cache_args="userid=".$id; |
|
61 | + $cache_args = "userid=".$id; |
|
62 | 62 | $cached_data = get_cached_data(USER_PAGE_TTL, $cache_args); |
63 | - if ($cached_data){ |
|
63 | + if ($cached_data) { |
|
64 | 64 | // We found some old but non-stale data, let's use it |
65 | 65 | $data = unserialize($cached_data); |
66 | 66 | $user = $data->user; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | BoincForumPrefs::lookup($user); |
75 | 75 | $user = @get_other_projects($user); |
76 | - $community_links = get_community_links_object($user); |
|
76 | + $community_links = get_community_links_object($user); |
|
77 | 77 | |
78 | 78 | $data = new StdClass; |
79 | 79 | $data->user = $user; |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | } |
40 | 40 | $format = get_str("format", true); |
41 | 41 | |
42 | -if ($format=="xml"){ |
|
42 | +if ($format=="xml") { |
|
43 | 43 | // don't do caching for XML |
44 | 44 | xml_header(); |
45 | 45 | $retval = db_init_xml(); |
46 | 46 | if ($retval) xml_error($retval); |
47 | - if ($auth){ |
|
47 | + if ($auth) { |
|
48 | 48 | $user = BoincUser::lookup_auth($auth); |
49 | 49 | $show_hosts = true; |
50 | 50 | } else { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // |
61 | 61 | $cache_args="userid=".$id; |
62 | 62 | $cached_data = get_cached_data(USER_PAGE_TTL, $cache_args); |
63 | - if ($cached_data){ |
|
63 | + if ($cached_data) { |
|
64 | 64 | // We found some old but non-stale data, let's use it |
65 | 65 | $data = unserialize($cached_data); |
66 | 66 | $user = $data->user; |
@@ -29,6 +29,6 @@ |
||
29 | 29 | $thread = BoincThread::lookup_id($threadid); |
30 | 30 | $logged_in_user = get_logged_in_user(); |
31 | 31 | |
32 | -$posts = get_thread_posts($threadid, 0,true); |
|
32 | +$posts = get_thread_posts($threadid, 0, true); |
|
33 | 33 | header("Location: forum_rate.php?choice=p&post=".$posts[0]->id); |
34 | 34 | ?> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $subset = sanitize_tags(get_str("subset")); |
28 | 28 | $venue = sanitize_tags(get_str("venue", true)); |
29 | 29 | $columns = get_str("cols", true); |
30 | -$c = $columns?"&cols=$columns":""; |
|
30 | +$c = $columns ? "&cols=$columns" : ""; |
|
31 | 31 | check_subset($subset); |
32 | 32 | |
33 | 33 | if ($action) { |
@@ -112,5 +112,5 @@ discard block |
||
112 | 112 | echo "<a href=prefs.php?subset=$subset$c>".tra("Back to preferences")."</a>\n"; |
113 | 113 | page_tail(); |
114 | 114 | |
115 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
115 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
116 | 116 | ?> |
@@ -77,11 +77,11 @@ |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | if ($disable_account_creation || defined('INVITE_CODES')) { |
80 | - echo " <account_creation_disabled/>\n"; |
|
80 | + echo " <account_creation_disabled/>\n"; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | if (defined('INVITE_CODES')) { |
84 | - echo " <invite_code_required/>\n"; |
|
84 | + echo " <invite_code_required/>\n"; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | echo " <min_passwd_length>$min_passwd_length</min_passwd_length>\n"; |
@@ -28,10 +28,10 @@ |
||
28 | 28 | // |
29 | 29 | function show_platforms() { |
30 | 30 | $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml")); |
31 | - if ($xmlFragment==false){ |
|
31 | + if ($xmlFragment == false) { |
|
32 | 32 | $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", ""); |
33 | 33 | $xmlFragment = " <platforms>"; |
34 | - foreach ($platforms as $platform){ |
|
34 | + foreach ($platforms as $platform) { |
|
35 | 35 | $xmlFragment .= " |
36 | 36 | <platform> |
37 | 37 | <platform_name>$platform->name</platform_name> |
@@ -28,10 +28,10 @@ |
||
28 | 28 | // |
29 | 29 | function show_platforms() { |
30 | 30 | $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml")); |
31 | - if ($xmlFragment==false){ |
|
31 | + if ($xmlFragment==false) { |
|
32 | 32 | $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", ""); |
33 | 33 | $xmlFragment = " <platforms>"; |
34 | - foreach ($platforms as $platform){ |
|
34 | + foreach ($platforms as $platform) { |
|
35 | 35 | $xmlFragment .= " |
36 | 36 | <platform> |
37 | 37 | <platform_name>$platform->name</platform_name> |