Commit 44e1e2c5 authored by Phil Höfer's avatar Phil Höfer
Browse files

Merge branch '570-atom-1-0-format-hinzufuegen' into 'development'

Resolve "Atom 1.0 Format hinzufuegen"

Closes #570

See merge request !1017
parents 51d7f048 011213e4
......@@ -95,10 +95,8 @@ class MetaGer
foreach ($this->results as $result) {
$viewResults[] = get_object_vars($result);
# Wir müssen natürlich noch den Log für die durchgeführte Suche schreiben:
if ($this->fokus === "bilder") {
switch ($this->out) {
case 'results':
......@@ -166,6 +164,14 @@ class MetaGer
->with('metager', $this)
->with('resultcount', sizeof($viewResults));
case 'atom10':
return view('metager3resultsatom10')
->with('results', $viewResults)
->with('eingabe', $this->eingabe)
->with('apiAuthorized', $this->apiAuthorized)
->with('metager', $this)
->with('resultcount', sizeof($viewResults));
case 'result-count':
# Wir geben die Ergebniszahl und die benötigte Zeit zurück:
return sizeof($viewResults) . ";" . round((microtime(true) - $this->starttime), 2);
<?xmlversion = "1.0"encoding = "UTF-8"?>
<feed xmlns=""
<title>{!! htmlspecialchars($eingabe, ENT_XML1, 'UTF-8'); !!} - MetaGer</title>
<link href="{{ url()->full() }}"/>
<updated>{{ date('c') }}</updated>
<opensearch:totalResults>{{ $resultcount }}</opensearch:totalResults>
<opensearch:Query role="request" searchTerms="{{ htmlspecialchars($eingabe, ENT_QUOTES) }}"/>
<link rel="next" href="{{htmlspecialchars($metager->nextSearchLink() ,ENT_QUOTES)}}" type="application/atom+xml"/>
@foreach($metager->getResults() as $result)
<title>{!! htmlspecialchars($result->titel, ENT_XML1, 'UTF-8'); !!}</title>
<link href="{!! htmlspecialchars($result->link, ENT_XML1, 'UTF-8'); !!}" />
<mg:anzeigeLink>{!! htmlspecialchars($result->anzeigeLink, ENT_XML1, 'UTF-8'); !!}</mg:anzeigeLink>
<content type="text">
{!! htmlspecialchars($result->longDescr, ENT_XML1, 'UTF-8'); !!}
<!-- Muster zu finden unter -->
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment