Go to details page when a search returns one result.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
Loui Chang 2009-03-03 12:55:14 -05:00
parent 5e5c95c6a8
commit 3c1b84bc7e

View file

@ -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;
}