LibreY

- privacy respecting meta search engine
git clone git://git.acid.vegas/LibreY.git
Log | Files | Refs | Archive | README | LICENSE

commit 37f77e5e8d7a02534809e607e8e33dd5d6dca389
parent bfe699d5ad1341db10eb378ed454c8cdd19ee7b8
Author: davidovski <david@davidovski.xyz>
Date: Wed, 30 Aug 2023 21:47:22 +0100

set default language

Diffstat:
Mengines/text/duckduckgo.php | 3++-
Mmisc/search_engine.php | 2+-

2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/engines/text/duckduckgo.php b/engines/text/duckduckgo.php
@@ -19,6 +19,7 @@
 
             if (isset($_COOKIE["safe_search"]))
                 $url .= "&safe=medium";
+
             return $url;
         }
 
@@ -60,7 +61,7 @@
                     )
                 );
            }
-            return $results;
+           return $results;
         }
 
     }
diff --git a/misc/search_engine.php b/misc/search_engine.php
@@ -75,7 +75,7 @@
 
         $opts->disable_frontends = (int) ($_REQUEST["nf"] ?? 0) == 1 || isset($_COOKIE["disable_frontends"]);
 
-        $opts->language = $_REQUEST["lang"] ?? trim(htmlspecialchars($_COOKIE["language"] ?? $opts->language));
+        $opts->language = $_REQUEST["lang"] ?? trim(htmlspecialchars($_COOKIE["language"] ?? $opts->language ?? "en"));
 
         $opts->do_fallback = (int) ($_REQUEST["nfb"] ?? 0) == 0;
         if (!$opts->instance_fallback) {