@@ -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 |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | usort($user->projects, "cmp"); |
| 123 | 123 | if ($personal) { |
| 124 | - $t = tra("Projects in which you are participating"); |
|
| 124 | + $t = tra("Projects in which you are participating"); |
|
| 125 | 125 | } else { |
| 126 | 126 | $t = tra("Projects in which %1 is participating", $user->name); |
| 127 | 127 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | if (!NO_STATS) { |
| 183 | - $cpid = md5($user->cross_project_id . $user->email_addr); |
|
| 183 | + $cpid = md5($user->cross_project_id.$user->email_addr); |
|
| 184 | 184 | $x = ""; |
| 185 | 185 | shuffle($cpid_stats_sites); |
| 186 | 186 | foreach ($cpid_stats_sites as $site) { |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | $u = normalize_user_url($user->url); |
| 265 | 265 | row2( |
| 266 | 266 | tra("URL"), |
| 267 | - $u?sprintf('<a href="%s">%s</a>', $u, $u):tra('Invalid URL') |
|
| 267 | + $u ?sprintf('<a href="%s">%s</a>', $u, $u) : tra('Invalid URL') |
|
| 268 | 268 | ); |
| 269 | 269 | } |
| 270 | 270 | if (USER_COUNTRY) { |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | // if $badge_height is > 0, show badges |
| 376 | 376 | // if $name_limit, limit name to N chars |
| 377 | 377 | // |
| 378 | -function user_links($user, $badge_height=0, $name_limit=0) { |
|
| 378 | +function user_links($user, $badge_height = 0, $name_limit = 0) { |
|
| 379 | 379 | if (!$user) { |
| 380 | 380 | error_log("user_links(): null arg\n"); |
| 381 | 381 | return; |
@@ -407,13 +407,13 @@ discard block |
||
| 407 | 407 | $user->id, |
| 408 | 408 | $name |
| 409 | 409 | ); |
| 410 | - if (function_exists("project_user_links")){ |
|
| 410 | + if (function_exists("project_user_links")) { |
|
| 411 | 411 | $x .= project_user_links($user); |
| 412 | 412 | } |
| 413 | 413 | if ($badge_height) { |
| 414 | 414 | $x .= badges_string(true, $user, $badge_height); |
| 415 | 415 | } |
| 416 | - return $name_limit?"<nobr>$x</nobr>":$x; |
|
| 416 | + return $name_limit ? "<nobr>$x</nobr>" : $x; |
|
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | function show_community_private($user) { |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | |
| 461 | 461 | // if there's a foundership request, notify the founder |
| 462 | 462 | // |
| 463 | - if ($user->id==$team->userid && $team->ping_user >0) { |
|
| 463 | + if ($user->id == $team->userid && $team->ping_user > 0) { |
|
| 464 | 464 | $x .= "<p class=\"text-danger\">".tra("(foundership change request pending)")."</p>"; |
| 465 | 465 | } |
| 466 | 466 | row2(tra("Member of team"), $x); |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | $friends = BoincFriend::enum("user_src=$user->id and reciprocated=1"); |
| 485 | 485 | $x = []; |
| 486 | 486 | if ($friends) { |
| 487 | - foreach($friends as $friend) { |
|
| 487 | + foreach ($friends as $friend) { |
|
| 488 | 488 | $fuser = BoincUser::lookup_id($friend->user_dest); |
| 489 | 489 | if (!$fuser) continue; |
| 490 | 490 | $x[] = friend_links($fuser); |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | |
| 531 | 531 | // return an object with data to show the user's community links |
| 532 | 532 | // |
| 533 | -function get_community_links_object($user){ |
|
| 533 | +function get_community_links_object($user) { |
|
| 534 | 534 | $cache_object = new StdClass; |
| 535 | 535 | $cache_object->post_count = total_posts($user); |
| 536 | 536 | $cache_object->user = $user; |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | $cache_object->friends = array(); |
| 539 | 539 | |
| 540 | 540 | $friends = BoincFriend::enum("user_src=$user->id and reciprocated=1"); |
| 541 | - foreach($friends as $friend) { |
|
| 541 | + foreach ($friends as $friend) { |
|
| 542 | 542 | $fuser = BoincUser::lookup_id($friend->user_dest); |
| 543 | 543 | if (!$fuser) continue; |
| 544 | 544 | $cache_object->friends[] = $fuser; |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | |
| 549 | 549 | // show community links of another user (described by $clo) |
| 550 | 550 | // |
| 551 | -function community_links($clo, $logged_in_user){ |
|
| 551 | +function community_links($clo, $logged_in_user) { |
|
| 552 | 552 | $user = $clo->user; |
| 553 | 553 | if (!$user) { |
| 554 | 554 | error_log("community_links(): null user\n"); |
@@ -578,15 +578,15 @@ discard block |
||
| 578 | 578 | "<a href=\"friend.php?action=cancel_confirm&userid=$user->id\">".tra("Cancel friendship")."</a>" |
| 579 | 579 | ); |
| 580 | 580 | } else if ($friend) { |
| 581 | - row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Request pending")."</a>"); |
|
| 581 | + row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Request pending")."</a>"); |
|
| 582 | 582 | } else { |
| 583 | - row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Add as friend")."</a>"); |
|
| 583 | + row2(tra("Friends"), "<a href=\"friend.php?action=add&userid=$user->id\">".tra("Add as friend")."</a>"); |
|
| 584 | 584 | } |
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | if ($friends) { |
| 588 | 588 | $x = []; |
| 589 | - foreach($friends as $friend) { |
|
| 589 | + foreach ($friends as $friend) { |
|
| 590 | 590 | $x[] = friend_links($friend); |
| 591 | 591 | } |
| 592 | 592 | row2(tra('Friends'), implode('<br>', $x)); |
@@ -653,6 +653,6 @@ discard block |
||
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | |
| 656 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
| 656 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
| 657 | 657 | |
| 658 | 658 | ?> |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $user->id, |
| 408 | 408 | $name |
| 409 | 409 | ); |
| 410 | - if (function_exists("project_user_links")){ |
|
| 410 | + if (function_exists("project_user_links")) { |
|
| 411 | 411 | $x .= project_user_links($user); |
| 412 | 412 | } |
| 413 | 413 | if ($badge_height) { |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | |
| 531 | 531 | // return an object with data to show the user's community links |
| 532 | 532 | // |
| 533 | -function get_community_links_object($user){ |
|
| 533 | +function get_community_links_object($user) { |
|
| 534 | 534 | $cache_object = new StdClass; |
| 535 | 535 | $cache_object->post_count = total_posts($user); |
| 536 | 536 | $cache_object->user = $user; |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | |
| 549 | 549 | // show community links of another user (described by $clo) |
| 550 | 550 | // |
| 551 | -function community_links($clo, $logged_in_user){ |
|
| 551 | +function community_links($clo, $logged_in_user) { |
|
| 552 | 552 | $user = $clo->user; |
| 553 | 553 | if (!$user) { |
| 554 | 554 | error_log("community_links(): null user\n"); |