Completed
Pull Request — master (#2135)
by Christian
10:38
created
html/user/create_team.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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");
Please login to merge, or discard this patch.
html/user/cert1.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
html/user/explain_state.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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 "
Please login to merge, or discard this patch.
html/user/show_user.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
html/user/forum_thread_vote.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
html/user/prefs_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
html/user/get_project_config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
html/user/forum_rss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 $ndays = get_int('ndays', true);
59 59
 $threads_only = get_str('threads_only', true);
60 60
 
61
-if(!$ndays || $ndays < 1) {
61
+if (!$ndays || $ndays < 1) {
62 62
     $ndays = 30;
63 63
 }
64 64
 
Please login to merge, or discard this patch.
html/user/top_users.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 if (!$users_per_page) {
29 29
     $users_per_page = 20;
30 30
 }
31
-define ('ITEM_LIMIT', 10000);
31
+define('ITEM_LIMIT', 10000);
32 32
 
33 33
 function get_top_participants($offset, $sort_by) {
34 34
     global $users_per_page;
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         <td align=right>", format_credit_large($user->expavg_credit), "</td>
68 68
         <td align=right>", format_credit_large($user->total_credit), "</td>
69 69
         <td>", $user->country, "</td>
70
-        <td>", time_str($user->create_time),"</td>
70
+        <td>", time_str($user->create_time), "</td>
71 71
         </tr>
72 72
     ";
73 73
 }
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
 }
83 83
 
84 84
 $offset = get_int("offset", true);
85
-if (!$offset) $offset=0;
86
-if ($offset % $users_per_page) $offset = 0;
85
+if (!$offset) $offset = 0;
86
+if ($offset%$users_per_page) $offset = 0;
87 87
 
88 88
 if ($offset < ITEM_LIMIT) {
89 89
     $cache_args = "sort_by=$sort_by&offset=$offset";
90
-    $cacheddata = get_cached_data(TOP_PAGES_TTL,$cache_args);
90
+    $cacheddata = get_cached_data(TOP_PAGES_TTL, $cache_args);
91 91
 
92 92
     // Do we have the data in cache?
93 93
     //
94
-    if ($cacheddata){
94
+    if ($cacheddata) {
95 95
         $data = unserialize($cacheddata); // use the cached data
96 96
     } else {
97 97
         //if not do queries etc to generate new data
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
         //save data in cache
101 101
         //
102
-        set_cached_data(TOP_PAGES_TTL, serialize($data),$cache_args);
102
+        set_cached_data(TOP_PAGES_TTL, serialize($data), $cache_args);
103 103
     }
104 104
 } else {
105 105
     error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT));
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Previous %1", $users_per_page)."</a> &middot; ";
123 123
 
124 124
 }
125
-if ($n==$users_per_page){ //If we aren't on the last page
125
+if ($n == $users_per_page) { //If we aren't on the last page
126 126
     $new_offset = $offset + $users_per_page;
127 127
     echo "<a href=top_users.php?sort_by=$sort_by&amp;offset=$new_offset>".tra("Next %1", $users_per_page)."</a>";
128 128
 }
Please login to merge, or discard this patch.