Commit 69b33d08 authored by Dominik Hebeler's avatar Dominik Hebeler

changed content-type of opensearch xml

parent 77fb3d0c
......@@ -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')
......
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