summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-02-03 23:52:31 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2017-02-03 23:54:31 +0100
commitac745f656d4c8d19cdcf8d843d6855c6b45a3974 (patch)
treea1ed0c31ca199702d36d54621b7c0359f94ec2b7
parent6cb8c041bc2264d02f7c86545170f45cc92d6caf (diff)
downloadaur-ac745f656d4c8d19cdcf8d843d6855c6b45a3974.tar.gz
aur-ac745f656d4c8d19cdcf8d843d6855c6b45a3974.tar.xz
Split out the search form from pkg_search_page()
This makes it easier to display search results without showing the search form. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--web/html/packages.php3
-rw-r--r--web/lib/pkgfuncs.inc.php2
2 files changed, 2 insertions, 3 deletions
diff --git a/web/html/packages.php b/web/html/packages.php
index 1b892781..8fd3266a 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -80,8 +80,9 @@ $(document).ready(function() {
</script>
<?php
+include('pkg_search_form.php');
+
if (isset($pkgid)) {
- include('pkg_search_form.php');
if ($pkgid) {
if (isset($_COOKIE["AURSID"])) {
pkg_display_details($pkgid, $details, $_COOKIE["AURSID"]);
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 8ca88352..8a5cf57b 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -888,8 +888,6 @@ function pkg_search_page($SID="") {
$templ_pages[__('Last') . ' &raquo;'] = ($pages - 1) * $per_page;
}
- include('pkg_search_form.php');
-
$searchresults = array();
if ($result) {
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {