mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Go to details page when a search returns one result.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
5e5c95c6a8
commit
3c1b84bc7e
1 changed files with 9 additions and 3 deletions
|
@ -408,8 +408,6 @@ function pkg_search_page($SID="") {
|
|||
$_GET["PP"] = 25;
|
||||
}
|
||||
|
||||
include('../template/pkg_search_form.php');
|
||||
|
||||
// FIXME: pull out DB-related code. all of it.
|
||||
// this one's worth a choco-chip cookie,
|
||||
// one of those nice big soft ones
|
||||
|
@ -529,7 +527,15 @@ function pkg_search_page($SID="") {
|
|||
$last = $_GET['PP'] + $_GET['O'];
|
||||
}
|
||||
|
||||
|
||||
if ($total > 1) {
|
||||
include('pkg_search_form.php');
|
||||
include('pkg_search_results.php');
|
||||
}
|
||||
else {
|
||||
$pkgdetails = mysql_fetch_assoc($result);
|
||||
header("Location: packages.php?ID={$pkgdetails['ID']}");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue