Code Duplication    Length = 5-5 lines in 2 locations

html/inc/user.inc 2 locations

@@ 419-423 (lines=5) @@
416
    $x = "<a href=\"user_search.php\">".tra("Find friends")."</a><br/>\n";
417
    $n = count($friends);
418
    if ($n) {
419
        foreach($friends as $friend) {
420
            $fuser = BoincUser::lookup_id($friend->user_dest);
421
            if (!$fuser) continue;
422
            $x .= friend_links($fuser);
423
        }
424
        row2(tra("Friends")." ($n)", $x);
425
    } else {
426
        row2(tra("Friends"), $x);
@@ 470-474 (lines=5) @@
467
    $cache_object->friends = array();
468
469
    $friends = BoincFriend::enum("user_src=$user->id and reciprocated=1");
470
    foreach($friends as $friend) {
471
        $fuser = BoincUser::lookup_id($friend->user_dest);
472
        if (!$fuser) continue;
473
        $cache_object->friends[] = $fuser;
474
    }
475
    return $cache_object;
476
}
477