Commit 97986331 authored by Davide Aprea's avatar Davide Aprea
Browse files

removed rss20 and marked atom10 as wip

parent d110a5c6
......@@ -207,19 +207,13 @@ class MetaGer
->with('fokus', $this->fokus);
break;
/* WIP
case 'rss20':
return view('resultpages.metager3resultsrss20')
->with('results', $viewResults)
->with('eingabe', $this->eingabe)
->with('apiAuthorized', $this->apiAuthorized)
->with('metager', $this)
->with('resultcount', sizeof($viewResults))
->with('fokus', $this->fokus);
break;
case 'api':
return response()->view('resultpages.metager3resultsatom10', ['results' => $viewResults, 'eingabe' => $this->eingabe, 'metager' => $this, 'resultcount' => sizeof($viewResults), 'key' => $this->apiKey, 'apiAuthorized' => $this->apiAuthorized])->header('Content-Type', 'application/xml');
break;
*/
case 'atom10':
return response()->view('resultpages.metager3resultsatom10', ['results' => $viewResults, 'eingabe' => $this->eingabe, 'metager' => $this, 'resultcount' => sizeof($viewResults), 'key' => $this->apiKey, 'apiAuthorized' => true])
->header('Content-Type', 'application/xml');
break;*/
case 'result-count':
# Wir geben die Ergebniszahl und die benötigte Zeit zurück:
return sizeof($viewResults) . ";" . round((microtime(true) - $this->starttime), 2);
......@@ -1193,7 +1187,7 @@ class MetaGer
$this->out = $request->input('out', "html");
# Standard output format html
if ($this->out !== "html" && $this->out !== "json" && $this->out !== "results" && $this->out !== "results-with-style" && $this->out !== "result-count" /*WIP && $this->out !== "rss20" && $this->out !== "api"*/) {
if ($this->out !== "html" && $this->out !== "json" && $this->out !== "results" && $this->out !== "results-with-style" && $this->out !== "result-count" /*WIP && $this->out !== "atom10" && $this->out !== "api"*/) {
$this->out = "html";
}
# Wir schalten den Cache aus, wenn die Ergebniszahl überprüft werden soll
......
<?xmlversion = "1.0"encoding = "UTF-8"?>
<rss version="2.0"
xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
xmlns:mg="http://metager.de/opensearch/"
xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{!! htmlspecialchars($eingabe, ENT_XML1, 'UTF-8'); !!} - MetaGer</title>
<opensearch:totalResults>{{ $resultcount }}</opensearch:totalResults>
<opensearch:Query role="request" searchTerms="{{ htmlspecialchars($eingabe, ENT_QUOTES) }}"/>
<mg:nextSearchResults url="{{htmlspecialchars($metager->nextSearchLink() ,ENT_QUOTES)}}" />
@if($apiAuthorized)
@foreach($metager->getResults() as $result)
<item>
<title>{!! htmlspecialchars($result->titel, ENT_XML1, 'UTF-8'); !!}</title>
<link>{!! htmlspecialchars($result->link, ENT_XML1, 'UTF-8'); !!}</link>
<mg:anzeigeLink>{!! htmlspecialchars($result->anzeigeLink, ENT_XML1, 'UTF-8'); !!}</mg:anzeigeLink>
<description>
{!! htmlspecialchars($result->longDescr, ENT_XML1, 'UTF-8'); !!}
</description>
</item>
@endforeach
@endif
</channel>
</rss>
Supports Markdown
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