@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // they've participated in |
34 | 34 | // |
35 | 35 | function get_other_projects($user) { |
36 | - $cpid = md5($user->cross_project_id . $user->email_addr); |
|
36 | + $cpid = md5($user->cross_project_id.$user->email_addr); |
|
37 | 37 | $url = "http://boinc.netsoft-online.com/get_user.php?cpid=".$cpid; |
38 | 38 | |
39 | 39 | // Check the cache for that URL |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | } |
172 | 172 | |
173 | 173 | if (!NO_STATS) { |
174 | - $cpid = md5($user->cross_project_id . $user->email_addr); |
|
174 | + $cpid = md5($user->cross_project_id.$user->email_addr); |
|
175 | 175 | $x = ""; |
176 | 176 | shuffle($cpid_stats_sites); |
177 | 177 | foreach ($cpid_stats_sites as $site) { |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | $u = normalize_user_url($user->url); |
256 | 256 | row2( |
257 | 257 | tra("URL"), |
258 | - $u?sprintf('<a href="%s">%s</a>', $u, $u):tra('Invalid URL') |
|
258 | + $u ?sprintf('<a href="%s">%s</a>', $u, $u) : tra('Invalid URL') |
|
259 | 259 | ); |
260 | 260 | } |
261 | 261 | if (USER_COUNTRY) { |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | // if $badge_height is > 0, show badges |
352 | 352 | // if $name_limit, limit name to N chars |
353 | 353 | // |
354 | -function user_links($user, $badge_height=0, $name_limit=0) { |
|
354 | +function user_links($user, $badge_height = 0, $name_limit = 0) { |
|
355 | 355 | BoincForumPrefs::lookup($user); |
356 | 356 | if (is_banished($user)) { |
357 | 357 | return "(banished: ID $user->id)"; |
@@ -366,13 +366,13 @@ discard block |
||
366 | 366 | $name = substr($name, 0, $name_limit)."..."; |
367 | 367 | } |
368 | 368 | $x .= " <a href=\"".url_base()."show_user.php?userid=".$user->id."\">".$name."</a>"; |
369 | - if (function_exists("project_user_links")){ |
|
369 | + if (function_exists("project_user_links")) { |
|
370 | 370 | $x .= project_user_links($user); |
371 | 371 | } |
372 | 372 | if ($badge_height) { |
373 | 373 | $x .= badges_string(true, $user, $badge_height); |
374 | 374 | } |
375 | - return $name_limit?"<nobr>$x</nobr>":$x; |
|
375 | + return $name_limit ? "<nobr>$x</nobr>" : $x; |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | function show_community_private($user) { |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | |
420 | 420 | // if there's a foundership request, notify the founder |
421 | 421 | // |
422 | - if ($user->id==$team->userid && $team->ping_user >0) { |
|
422 | + if ($user->id == $team->userid && $team->ping_user > 0) { |
|
423 | 423 | $x .= "<p class=\"text-danger\">".tra("(foundership change request pending)")."</p>"; |
424 | 424 | } |
425 | 425 | row2(tra("Member of team"), $x); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | $x = "<a href=\"user_search.php\">".tra("Find friends")."</a><br/>\n"; |
445 | 445 | $n = count($friends); |
446 | 446 | if ($n) { |
447 | - foreach($friends as $friend) { |
|
447 | + foreach ($friends as $friend) { |
|
448 | 448 | $fuser = BoincUser::lookup_id($friend->user_dest); |
449 | 449 | if (!$fuser) continue; |
450 | 450 | $x .= friend_links($fuser); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | // Returns a cacheable community links data object |
490 | 490 | // @param user The user to produce a community links object for |
491 | 491 | |
492 | -function get_community_links_object($user){ |
|
492 | +function get_community_links_object($user) { |
|
493 | 493 | $cache_object = new StdClass; |
494 | 494 | $cache_object->post_count = total_posts($user); |
495 | 495 | $cache_object->user = $user; |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | $cache_object->friends = array(); |
498 | 498 | |
499 | 499 | $friends = BoincFriend::enum("user_src=$user->id and reciprocated=1"); |
500 | - foreach($friends as $friend) { |
|
500 | + foreach ($friends as $friend) { |
|
501 | 501 | $fuser = BoincUser::lookup_id($friend->user_dest); |
502 | 502 | if (!$fuser) continue; |
503 | 503 | $cache_object->friends[] = $fuser; |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | return $cache_object; |
506 | 506 | } |
507 | 507 | |
508 | -function community_links($clo, $logged_in_user){ |
|
508 | +function community_links($clo, $logged_in_user) { |
|
509 | 509 | $user = $clo->user; |
510 | 510 | $team = $clo->team; |
511 | 511 | $friends = $clo->friends; |
@@ -531,15 +531,15 @@ discard block |
||
531 | 531 | "<a href=\"friend.php?action=cancel_confirm&userid=$user->id\">".tra("Cancel friendship")."</a>" |
532 | 532 | ); |
533 | 533 | } else if ($friend) { |
534 | - row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Request pending")."</a>"); |
|
534 | + row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Request pending")."</a>"); |
|
535 | 535 | } else { |
536 | - row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Add as friend")."</a>"); |
|
536 | + row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Add as friend")."</a>"); |
|
537 | 537 | } |
538 | 538 | } |
539 | 539 | |
540 | 540 | if ($friends) { |
541 | 541 | $x = ""; |
542 | - foreach($friends as $friend) { |
|
542 | + foreach ($friends as $friend) { |
|
543 | 543 | $x .= friend_links($friend); |
544 | 544 | } |
545 | 545 | row2(tra("Friends")." (".sizeof($friends).")", $x); |
@@ -583,6 +583,6 @@ discard block |
||
583 | 583 | } |
584 | 584 | |
585 | 585 | |
586 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
586 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
587 | 587 | |
588 | 588 | ?> |