[web-php] master: Fix: Remove unused parameters

From: Date: Mon, 11 Jul 2022 16:46:15 +0000
Subject: [web-php] master: Fix: Remove unused parameters
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-30326@lists.php.net to get a copy of this message
Author: Andreas Möller (localheinz) Committer: GitHub (web-flow) Pusher: cmb69 Date: 2022-07-11T18:39:48+02:00 Commit: https://github.com/php/web-php/commit/f24a9f3906cf0cd55779a380da04151ed490e063 Raw diff: https://github.com/php/web-php/commit/f24a9f3906cf0cd55779a380da04151ed490e063.diff Fix: Remove unused parameters Closes GH-577. Changed paths: M include/prepend.inc M results.php Diff: diff --git a/include/prepend.inc b/include/prepend.inc index 3870dbaf0..f5c1dce41 100644 --- a/include/prepend.inc +++ b/include/prepend.inc @@ -188,10 +188,7 @@ function myphpnet_save() } -// Default: Default search. -// Lang: Not yet implemented (TODO: Compare google lang codes with ours. We did this for bing already, so maybe it's an easy fix) -// TODO: Possible $default escaping issues -function google_cse($default = '', $lang = 'en') { +function google_cse() { ?> <noscript> php.net's search functionality requires JavaScript to operate. Please enable diff --git a/results.php b/results.php index 273e488ed..70aa69bae 100644 --- a/results.php +++ b/results.php @@ -3,18 +3,6 @@ include __DIR__ . '/include/prepend.inc'; include __DIR__ . '/include/results.inc'; -if (!isset($_GET['l']) || !is_string($_GET['l'])) { - $_GET['l'] = null; -} - -$lang = isset($_GET["l"]) ? (string)$_GET["l"] : "en"; -$query = isset($_GET["q"]) ? (string)$_GET["q"] : ''; - -if (!isset($LANGUAGES[$lang])) { - $lang = "en"; -} - - // HTTP status line is passed on, signifies an error site_header( 'Search results', @@ -27,6 +15,6 @@ echo '<h1>Search results</h1>'; -google_cse($query, $lang); +google_cse(); site_footer();

« previous php.webmaster (#30326) next »