pub / serci

Search the web with !keywords
git clone https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

commit bb0aa29f3239f6b11a02938115b755ae9dadcbcc
parent bf334d8a8b137a7c16f5124a3f2f541946023b35
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sun,  7 Jul 2024 22:01:29 +0200

fix: allow "query" and "q" via GET request

Diffstat:
Mindex.php | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/index.php b/index.php @@ -9,7 +9,13 @@ include("config/config.php"); /* Fetch and sanitize search query via GET request */ $_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_FULL_SPECIAL_CHARS); -$query = rawurldecode($_GET["query"]); +if (!is_null($_GET["query"])) { + $query = rawurldecode($_GET["query"]); +} else if (!is_null($_GET["q"])) { + $query = rawurldecode($_GET["q"]); +} else { + $query = null; +} if (strlen($query) > 0) {