Ticket #982: statistics.diff
File statistics.diff, 4.5 KB (added by , 14 years ago) |
---|
-
user/top_hosts.php
21 21 require_once("../inc/user.inc"); 22 22 require_once("../inc/host.inc"); 23 23 require_once("../inc/boinc_db.inc"); 24 require_once("../inc/translation.inc");25 24 26 25 $config = get_config(); 27 26 $hosts_per_page = parse_config($config, "<hosts_per_page>"); … … 63 62 if ($offset % $hosts_per_page) $offset = 0; 64 63 65 64 if ($offset >= ITEM_LIMIT) { 66 error_page( "Limit exceeded - Sorry, first ".ITEM_LIMIT." items only");65 error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT)); 67 66 } 68 67 69 68 $cache_args = "sort_by=$sort_by&offset=$offset"; … … 89 88 echo "</table>\n<p>"; 90 89 if ($offset > 0) { 91 90 $new_offset = $offset - $hosts_per_page; 92 echo "<a href=top_hosts.php?sort_by=$sort_by&offset=$new_offset> Previous ".$hosts_per_page."</a> | ";91 echo "<a href=top_hosts.php?sort_by=$sort_by&offset=$new_offset>".tra("Previous %1", $hosts_per_page)."</a> | "; 93 92 94 93 } 95 94 if ($n==$hosts_per_page){ //If we aren't on the last page 96 95 $new_offset = $offset + $hosts_per_page; 97 echo "<a href=top_hosts.php?sort_by=$sort_by&offset=$new_offset> Next ".$hosts_per_page."</a>";96 echo "<a href=top_hosts.php?sort_by=$sort_by&offset=$new_offset>".tra("Next %1", $hosts_per_page)."</a>"; 98 97 } 99 98 100 99 page_tail(); -
user/top_teams.php
20 20 require_once("../inc/util.inc"); 21 21 require_once("../inc/team.inc"); 22 22 require_once("../inc/db.inc"); 23 require_once("../inc/translation.inc");24 23 25 24 $config = get_config(); 26 25 $teams_per_page = parse_config($config, "<teams_per_page>"); … … 96 95 set_cache_data(teams_to_store($data),$cache_args); 97 96 } 98 97 } else { 99 error_page( "Limit exceeded - Sorry, first ".ITEM_LIMIT." items only");98 error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT)); 100 99 } 101 100 102 101 … … 104 103 page_head(tra("Top %1 teams", $type_name)); 105 104 106 105 if (count($data) == 0) { 107 echo "There are no $type_name teams";106 echo tra("There are no %1 teams", $type_name); 108 107 } else { 109 108 start_table(); 110 109 team_table_start($sort_by, $type_url); … … 117 116 echo "</table>\n<p>"; 118 117 if ($offset > 0) { 119 118 $new_offset = $offset - $teams_per_page; 120 echo "<a href=top_teams.php?sort_by=$sort_by&offset=$new_offset".$type_url."> Previous ".$teams_per_page."</a> | ";119 echo "<a href=top_teams.php?sort_by=$sort_by&offset=$new_offset".$type_url.">".tra("Previous %1", $teams_per_page)."</a> | "; 121 120 122 121 } 123 122 if ($n==$teams_per_page){ //If we aren't on the last page 124 123 $new_offset = $offset + $teams_per_page; 125 echo "<a href=top_teams.php?sort_by=$sort_by&offset=$new_offset".$type_url."> Next ".$teams_per_page."</a>";124 echo "<a href=top_teams.php?sort_by=$sort_by&offset=$new_offset".$type_url.">".tra("Next %1", $teams_per_page)."</a>"; 126 125 } 127 126 } 128 127 page_tail(); -
user/top_users.php
20 20 require_once("../inc/util.inc"); 21 21 require_once("../inc/user.inc"); 22 22 require_once("../inc/boinc_db.inc"); 23 require_once("../inc/translation.inc");24 23 25 24 $config = get_config(); 26 25 $users_per_page = parse_config($config, "<users_per_page>"); … … 108 107 set_cache_data(serialize($data),$cache_args); 109 108 } 110 109 } else { 111 error_page( "Limit exceeded - Sorry, first ".ITEM_LIMIT." items only");110 error_page(tra("Limit exceeded - Sorry, first %1 items only", ITEM_LIMIT)); 112 111 } 113 112 114 113 // Now display what we've got (either gotten from cache or from DB) … … 123 122 echo "</table>\n<p>"; 124 123 if ($offset > 0) { 125 124 $new_offset = $offset - $users_per_page; 126 echo "<a href=top_users.php?sort_by=$sort_by&offset=$new_offset> Previous ".$users_per_page."</a> | ";125 echo "<a href=top_users.php?sort_by=$sort_by&offset=$new_offset>".tra("Previous %1", $users_per_page)."</a> | "; 127 126 128 127 } 129 128 if ($n==$users_per_page){ //If we aren't on the last page 130 129 $new_offset = $offset + $users_per_page; 131 echo "<a href=top_users.php?sort_by=$sort_by&offset=$new_offset> Next ".$users_per_page."</a>";130 echo "<a href=top_users.php?sort_by=$sort_by&offset=$new_offset>".tra("Next %1", $users_per_page)."</a>"; 132 131 } 133 132 134 133 page_tail();