Skip to content
Snippets Groups Projects

Development

Merged Dominik Hebeler requested to merge development into master
3 files
+ 16
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -11,7 +11,7 @@ class Quicktips
@@ -11,7 +11,7 @@ class Quicktips
{
{
use DispatchesJobs;
use DispatchesJobs;
const QUICKTIP_URL = "http://localhost:63825/1.1/quicktips.xml";
private $quicktipUrl = "/1.1/quicktips.xml";
const QUICKTIP_NAME = "quicktips";
const QUICKTIP_NAME = "quicktips";
const CACHE_DURATION = 60;
const CACHE_DURATION = 60;
@@ -19,12 +19,17 @@ class Quicktips
@@ -19,12 +19,17 @@ class Quicktips
public function __construct($search, $locale, $max_time)
public function __construct($search, $locale, $max_time)
{
{
 
if (env("APP_ENV") === "production") {
 
$this->quicktipUrl = "https://quicktips.metager.de" . $this->quicktipUrl;
 
} else {
 
$this->quicktipUrl = "https://dev.quicktips.metager.de" . $this->quicktipUrl;
 
}
$this->startSearch($search, $locale, $max_time);
$this->startSearch($search, $locale, $max_time);
}
}
public function startSearch($search, $locale, $max_time)
public function startSearch($search, $locale, $max_time)
{
{
$url = self::QUICKTIP_URL . "?search=" . $this->normalize_search($search) . "&locale=" . $locale;
$url = $this->quicktipUrl . "?search=" . $this->normalize_search($search) . "&locale=" . $locale;
# TODO anders weitergeben
# TODO anders weitergeben
$this->hash = md5($url);
$this->hash = md5($url);
Loading