@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | $user->id, |
396 | 396 | $name |
397 | 397 | ); |
398 | - if (function_exists("project_user_links")){ |
|
398 | + if (function_exists("project_user_links")) { |
|
399 | 399 | $x .= project_user_links($user); |
400 | 400 | } |
401 | 401 | if ($badge_height) { |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | // Returns a cacheable community links data object |
520 | 520 | // @param user The user to produce a community links object for |
521 | 521 | |
522 | -function get_community_links_object($user){ |
|
522 | +function get_community_links_object($user) { |
|
523 | 523 | $cache_object = new StdClass; |
524 | 524 | $cache_object->post_count = total_posts($user); |
525 | 525 | $cache_object->user = $user; |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | |
538 | 538 | // show community links of another user (described by $clo) |
539 | 539 | // |
540 | -function community_links($clo, $logged_in_user){ |
|
540 | +function community_links($clo, $logged_in_user) { |
|
541 | 541 | $user = $clo->user; |
542 | 542 | $team = $clo->team; |
543 | 543 | $friends = $clo->friends; |
@@ -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 | } |
@@ -103,7 +104,7 @@ discard block |
||
103 | 104 | tra("Attach signature by default") |
104 | 105 | ) |
105 | 106 | ); |
106 | -if ($user->prefs->signature!=""){ |
|
107 | +if ($user->prefs->signature!="") { |
|
107 | 108 | row2(tra("Signature preview"). |
108 | 109 | "<br><p class=\"text-muted\">".tra("This is how your signature will look in the forums")."</p>", |
109 | 110 | output_transform($user->prefs->signature) |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | foreach ($files as $file) { |
62 | 62 | $path = "$dir/$file"; |
63 | 63 | [$err, $file_size, $file_md5] = sandbox_parse_link_file($path); |
64 | - if (!$err){ |
|
64 | + if (!$err) { |
|
65 | 65 | if (strcmp($md5, $file_md5) == 0) { |
66 | 66 | $exist = true; |
67 | 67 | $elf = $file; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | // TODO: this is a kludge. |
155 | 155 | // Should we use the job_file and batch_file_assoc tables instead? |
156 | 156 | // |
157 | -function sandbox_file_in_use($user, $file){ |
|
157 | +function sandbox_file_in_use($user, $file) { |
|
158 | 158 | $ufiles = array(); |
159 | 159 | |
160 | 160 | $pbatches = BoincBatch::enum( |
@@ -164,16 +164,16 @@ discard block |
||
164 | 164 | ); |
165 | 165 | if (!$pbatches) return false; |
166 | 166 | |
167 | - foreach ($pbatches as $batch){ |
|
167 | + foreach ($pbatches as $batch) { |
|
168 | 168 | $wus = BoincWorkUnit::enum("batch = $batch->id limit 1" ); |
169 | - if ($wus == null){ |
|
169 | + if ($wus == null) { |
|
170 | 170 | continue; |
171 | 171 | } |
172 | - foreach($wus as $wu){ |
|
172 | + foreach($wus as $wu) { |
|
173 | 173 | $x = "<in>".$wu->xml_doc."</in>"; |
174 | 174 | $x = simplexml_load_string($x); |
175 | 175 | global $fanout; |
176 | - foreach($x->workunit->file_ref as $fr){ |
|
176 | + foreach($x->workunit->file_ref as $fr) { |
|
177 | 177 | $pname = (string)$fr->file_name; |
178 | 178 | $ufiles[] = $pname; |
179 | 179 | } |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | $dir = sandbox_dir($user); |
183 | 183 | $path = $dir."/".$file; |
184 | 184 | list($err, $size, $md5) = sandbox_parse_link_file($path); |
185 | - if (!$err){ |
|
185 | + if (!$err) { |
|
186 | 186 | $f = sandbox_file_name($user, $md5); |
187 | 187 | foreach($ufiles as $uf) { |
188 | - if (strcmp($f,$uf) == 0){ |
|
188 | + if (strcmp($f,$uf) == 0) { |
|
189 | 189 | return true; |
190 | 190 | } |
191 | 191 | } |