Skip to content
Snippets Groups Projects
Commit 04b15565 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Revert "Merge branch '804-quicktip-server-auf-lokal-umstellen' into 'development'"

This reverts merge request !1313
parent fff9accf
No related branches found
No related tags found
1 merge request!1365Resolve "Filter Options for MetaGer"
...@@ -12,9 +12,9 @@ class Quicktips ...@@ -12,9 +12,9 @@ class Quicktips
{ {
use DispatchesJobs; use DispatchesJobs;
//const QUICKTIP_URL = "https://quicktips.metager3.de/quicktips.xml"; const QUICKTIP_URL = "https://quicktips.metager3.de/quicktips.xml";
const QUICKTIP_URL = "http://localhost:63825/quicktips.xml"; //const QUICKTIP_URL = "http://localhost:63825/quicktips.xml";
const QUICKTIP_NAME = "quicktips"; const QUICKTIP_NAME = "quicktips";
const CACHE_DURATION = 60; const CACHE_DURATION = 60;
private $hash; private $hash;
...@@ -69,7 +69,7 @@ class Quicktips ...@@ -69,7 +69,7 @@ class Quicktips
public function loadResults() public function loadResults()
{ {
$resultsRaw = $this->retrieveResults($this->hash); $resultsRaw = $this->retrieveResults($this->hash);
$results = $this->parseResults($resultsRaw); $results = $this->parseResults($resultsRaw);
return $results; return $results;
} }
...@@ -140,14 +140,14 @@ class Quicktips ...@@ -140,14 +140,14 @@ class Quicktips
$descr = $quicktip_xml->content->__toString(); $descr = $quicktip_xml->content->__toString();
// Details // Details
$details = []; $details = [];
$details_xpath = $quicktip_xml->xpath('mg:details'); $details_xpath = $quicktip_xml->xpath('mg:details');
if (sizeof($details_xpath) > 0) { if (sizeof($details_xpath) > 0) {
foreach ($details_xpath[0] as $detail_xml) { foreach ($details_xpath[0] as $detail_xml) {
$details_title = $detail_xml->title->__toString(); $details_title = $detail_xml->title->__toString();
$details_link = $detail_xml->url->__toString(); $details_link = $detail_xml->url->__toString();
$details_descr = $detail_xml->text->__toString(); $details_descr = $detail_xml->text->__toString();
$details[] = new \App\Models\Quicktips\Quicktip_detail( $details[] = new \App\Models\Quicktips\Quicktip_detail(
$details_title, $details_title,
$details_link, $details_link,
$details_descr $details_descr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment