Skip to content
GitLab
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
69b33d08
Commit
69b33d08
authored
Feb 26, 2019
by
Dominik Hebeler
Browse files
changed content-type of opensearch xml
parent
77fb3d0c
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/StartpageController.php
View file @
69b33d08
...
...
@@ -22,9 +22,9 @@ class StartpageController extends Controller
public
function
loadStartPage
(
Request
$request
)
{
$focusPages
=
[];
$theme
=
"default"
;
$theme
=
"default"
;
$optionParams
=
[
'param_sprueche'
,
'param_newtab'
,
'param_maps'
,
'param_autocomplete'
,
'param_lang'
,
'param_key'
];
$optionParams
=
[
'param_sprueche'
,
'param_newtab'
,
'param_maps'
,
'param_autocomplete'
,
'param_lang'
,
'param_key'
];
$option_values
=
[];
foreach
(
$optionParams
as
$param
)
{
...
...
@@ -89,9 +89,9 @@ class StartpageController extends Controller
public
function
loadPlugin
(
$params
,
$locale
=
"de"
)
{
$params
=
unserialize
(
base64_decode
(
$params
));
$params
=
unserialize
(
base64_decode
(
$params
));
$requests
=
$params
;
$params
=
[];
$params
=
[];
foreach
(
$requests
as
$key
=>
$value
)
{
if
(
strpos
(
$key
,
"param_"
)
===
0
)
{
$key
=
substr
(
$key
,
strpos
(
$key
,
"param_"
)
+
6
);
...
...
@@ -121,6 +121,10 @@ class StartpageController extends Controller
array_forget
(
$params
,
'out'
);
array_forget
(
$params
,
'page'
);
array_forget
(
$params
,
'request'
);
array_forget
(
$params
,
'focus'
);
array_forget
(
$params
,
'encoding'
);
array_forget
(
$params
,
'lang'
);
$link
=
action
(
'MetaGerSearch@search'
,
[]);
$response
=
Response
::
make
(
...
...
@@ -129,7 +133,7 @@ class StartpageController extends Controller
->
with
(
'params'
,
$params
)
->
with
(
'hostname'
,
gethostname
())
->
with
(
'request'
,
$request
),
"200"
);
$response
->
header
(
'Content-Type'
,
"application/xml"
);
$response
->
header
(
'Content-Type'
,
"application/
opensearchdescription+
xml"
);
return
$response
;
}
...
...
@@ -146,12 +150,12 @@ class StartpageController extends Controller
public
function
berlin
(
Request
$request
)
{
$link
=
""
;
$link
=
""
;
$password
=
""
;
if
(
$request
->
filled
(
'eingabe'
))
{
$password
=
getenv
(
'berlin'
);
$password
=
md5
(
$request
->
input
(
'eingabe'
)
.
" -host:userpage.fu-berlin.de"
.
$password
);
$link
=
"/meta/meta.ger3?eingabe="
.
$request
->
input
(
'eingabe'
)
.
" -host:userpage.fu-berlin.de&focus=web&password="
.
$password
.
"&encoding=utf8&lang=all&site=fu-berlin.de&quicktips=off&out=results-with-style"
;
$link
=
"/meta/meta.ger3?eingabe="
.
$request
->
input
(
'eingabe'
)
.
" -host:userpage.fu-berlin.de&focus=web&password="
.
$password
.
"&encoding=utf8&lang=all&site=fu-berlin.de&quicktips=off&out=results-with-style"
;
}
return
view
(
'berlin'
)
->
with
(
'title'
,
'Testseite für die FU-Berlin'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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