Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
97986331
Commit
97986331
authored
Oct 30, 2020
by
Davide Aprea
Browse files
removed rss20 and marked atom10 as wip
parent
d110a5c6
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
97986331
...
...
@@ -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 !== "
rss2
0" && $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 !== "
atom1
0" && $this->out !== "api"*/
)
{
$this
->
out
=
"html"
;
}
# Wir schalten den Cache aus, wenn die Ergebniszahl überprüft werden soll
...
...
resources/views/resultpages/metager3resultsrss20.blade.php
deleted
100644 → 0
View file @
d110a5c6
<?
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>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment