From 9c422cdb73d518a7676f5c9ccd49d8f3ce0be99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phil=20H=C3=B6fer?= <phil@suma-ev.de> Date: Tue, 3 Nov 2020 07:59:44 +0000 Subject: [PATCH] Update Quicktips.php --- app/Models/Quicktips/Quicktips.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Models/Quicktips/Quicktips.php b/app/Models/Quicktips/Quicktips.php index 152268e7b..daaac1506 100644 --- a/app/Models/Quicktips/Quicktips.php +++ b/app/Models/Quicktips/Quicktips.php @@ -17,21 +17,23 @@ class Quicktips private $hash; private $startTime; + private $quotes; - public function __construct($search, $locale, $max_time) + public function __construct($search, $locale, $max_time, $quotes = "on") { if (env("APP_ENV") === "production") { $this->quicktipUrl = "https://quicktips.metager.de" . $this->quicktipUrl; } else { $this->quicktipUrl = "https://dev.quicktips.metager.de" . $this->quicktipUrl; } + $this->quotes = $quotes; $this->startTime = microtime(true); $this->startSearch($search, $locale, $max_time); } public function startSearch($search, $locale, $max_time) { - $url = $this->quicktipUrl . "?search=" . $this->normalize_search($search) . "&locale=" . $locale; + $url = $this->quicktipUrl . "?search=" . $this->normalize_search($search) . "&locale=" . $locale . ""es=" . $this->quotes; $this->hash = md5($url); if (!Cache::has($this->hash)) { -- GitLab