Skip to content
Permalink
Browse files

Web: in result list, sort by name if showing names, and allow search …

…by result name.
  • Loading branch information...
davidpanderson committed Sep 8, 2013
1 parent 9024f8c commit e798bf50ebce5159f800bcff08a6ed25caa147b5
Showing with 16 additions and 7 deletions.
  1. +1 −0 html/inc/result.inc
  2. +9 −6 html/user/result.php
  3. +6 −1 html/user/results.php
@@ -744,6 +744,7 @@ function result_navigation($info, $where_clause) {
}
}
$x .= "<form action=result.php>".tra("Task name:")."<input size=40 name=result_name><input type=submit value='OK'></form>";
$x .= "</center><br>";
return $x;
}
@@ -18,18 +18,21 @@
// show a result
require_once("../inc/db.inc");
require_once("../inc/util.inc");
require_once("../inc/result.inc");
check_get_args(array("resultid"));
$x = get_int("resultid", true);
if ($x) {
$result = BoincResult::lookup_id($x);
} else {
$x = get_str("result_name");
$result = BoincResult::lookup_name($x);
}
$resultid = get_int("resultid");
$result = lookup_result($resultid);
if (!$result) {
error_page(tra("No such task"));
error_page(tra("No such task: $x"));
}
page_head(tra("Task %1", $resultid));
page_head(tra("Task %1", $x));
show_result($result);
page_tail();
@@ -74,7 +74,12 @@
$clause2 .= ' AND appid='.$appid;
}
$query = "$clause2 order by id desc limit $offset,".($results_per_page+1);
if ($show_names) {
$order_clause = "order by name";
} else {
$order_clause = "order by id desc";
}
$query = "$clause2 $order_clause limit $offset,".($results_per_page+1);
$results = BoincResult::enum($query);
$info = new StdClass;

0 comments on commit e798bf5

Please sign in to comment.
You can’t perform that action at this time.