From 96109b6f1bfdd06347910959906ce32b22469f11 Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Fri, 28 Apr 2017 07:46:17 +0200 Subject: [PATCH] Revert "Web: paginate user/team lists ordered by per-app credit" This reverts commit ee3f8f1aa232a615f40c2dbee9047e2fb6551b83. --- html/inc/bootstrap.inc | 8 +++----- html/user/per_app_list.php | 28 +++++++--------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/html/inc/bootstrap.inc b/html/inc/bootstrap.inc index e109c47fdb..2f37eef09a 100644 --- a/html/inc/bootstrap.inc +++ b/html/inc/bootstrap.inc @@ -163,11 +163,9 @@ function sample_navbar( if (defined('NO_COMPUTING')) { // this is for projects that don't do computing, e.g. BOSSA-based // - if (defined('BOSSA')) { - navbar_menu(tra("Participate"), array( - array(tra("Do work"), $url_prefix."bossa_apps.php"), - )); - } + navbar_menu(tra("Participate"), array( + array(tra("Do work"), $url_prefix."bossa_apps.php"), + )); } else { $x = array( array(tra("Server status"), $url_prefix."server_status.php"), diff --git a/html/user/per_app_list.php b/html/user/per_app_list.php index 094b8d0a5c..767e0f2c42 100644 --- a/html/user/per_app_list.php +++ b/html/user/per_app_list.php @@ -26,8 +26,6 @@ require_once("../inc/util.inc"); require_once("../inc/team.inc"); -$items_per_page = 20; - // return a column title (Average or Total), // hyperlinked if this is not the current sort column // @@ -46,7 +44,7 @@ function col_title($is_team, $app, $appid, $is_total, $i) { function show_header($is_team, $apps, $appid, $is_total) { echo " "; foreach ($apps as $app) { - echo "$app->name\n"; + echo "$app->name\n"; } echo ""; @@ -55,7 +53,7 @@ function show_header($is_team, $apps, $appid, $is_total) { foreach ($apps as $app) { for ($i=0; $i<2; $i++) { $x = col_title($is_team, $app, $appid, $is_total, $i); - echo "$x\n"; + echo "$x\n"; } } echo ""; @@ -98,8 +96,7 @@ function show_row($item, $apps, $is_team, $i) { echo "\n"; } -function show_list($is_team, $appid, $is_total, $offset) { - global $items_per_page; +function show_list($is_team, $appid, $is_total) { $x = $is_team?"teams":"participants"; page_head("Top $x by application"); $apps = BoincApp::enum("deprecated=0"); @@ -110,34 +107,23 @@ function show_list($is_team, $appid, $is_total, $offset) { show_header($is_team, $apps, $appid, $is_total); $x = $is_total?"total":"expavg"; if ($is_team) { - $items = BoincCreditTeam::enum("appid=$appid order by $x desc limit $offset,$items_per_page"); + $items = BoincCreditTeam::enum("appid=$appid order by $x desc"); } else { - $items = BoincCreditUser::enum("appid=$appid order by $x desc limit $offset,$items_per_page"); + $items = BoincCreditUser::enum("appid=$appid order by $x desc"); } - $i = $offset+1; + $i = 0; foreach ($items as $item) { show_row($item, $apps, $is_team, $i); $i++; } end_table(); - if ($offset) { - $n = $offset - $items_per_page; - echo "Previous $items_per_page - · - "; - } - $n = $offset + $items_per_page; - echo "Next $items_per_page - "; page_tail(); } $is_team = get_int('is_team', true); $appid = get_int('appid', true); $is_total = get_int('is_total', true); -$offset = get_int('offset', true); -if ($offset == null) $offset = 0; -show_list($is_team, $appid, $is_total, $offset); +show_list($is_team, $appid, $is_total); ?>