Code Duplication    Length = 7-9 lines in 2 locations

html/user/top_users.php 1 location

@@ 49-55 (lines=7) @@
46
    $x = array();
47
    $x[] = tra("Rank");
48
    $x[] = tra("Name");
49
    if ($sort_by == "total_credit") {
50
        $x[] = "<a href=top_users.php?sort_by=expavg_credit>".tra("Recent average credit")."</a>";
51
        $x[] = tra("Total credit");
52
    } else {
53
        $x[] = tra("Recent average credit");
54
        $x[] = "<a href=top_users.php?sort_by=total_credit>".tra("Total credit")."</a>";
55
    }
56
    $x[] = tra("Country");
57
    $x[] = tra("Participant since");
58
    $a = array(null, null, ALIGN_RIGHT, ALIGN_RIGHT, null, null);

html/inc/host.inc 1 location

@@ 232-240 (lines=9) @@
229
        tra("Rank"),
230
        tra("Owner"),
231
    );
232
    if (!NO_STATS) {
233
        if ($sort_by == 'total_credit') {
234
            $x[] = "<a href=top_hosts.php?sort_by=expavg_credit>".tra("Avg. credit")."</a>";
235
            $x[] = tra("Total credit");
236
        } else {
237
            $x[] = tra("Recent average credit");
238
            $x[] = "<a href=top_hosts.php?sort_by=total_credit>".tra("Total credit")."</a>";
239
        }
240
    }
241
    $x[] = tra("BOINC version");
242
    $x[] = tra("CPU");
243
    $x[] = tra("GPU");