Skip to content
Snippets Groups Projects
Commit 69b33d08 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

changed content-type of opensearch xml

parent 77fb3d0c
No related branches found
No related tags found
No related merge requests found
...@@ -22,9 +22,9 @@ class StartpageController extends Controller ...@@ -22,9 +22,9 @@ class StartpageController extends Controller
public function loadStartPage(Request $request) public function loadStartPage(Request $request)
{ {
$focusPages = []; $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 = []; $option_values = [];
foreach ($optionParams as $param) { foreach ($optionParams as $param) {
...@@ -89,9 +89,9 @@ class StartpageController extends Controller ...@@ -89,9 +89,9 @@ class StartpageController extends Controller
public function loadPlugin($params, $locale = "de") public function loadPlugin($params, $locale = "de")
{ {
$params = unserialize(base64_decode($params)); $params = unserialize(base64_decode($params));
$requests = $params; $requests = $params;
$params = []; $params = [];
foreach ($requests as $key => $value) { foreach ($requests as $key => $value) {
if (strpos($key, "param_") === 0) { if (strpos($key, "param_") === 0) {
$key = substr($key, strpos($key, "param_") + 6); $key = substr($key, strpos($key, "param_") + 6);
...@@ -121,6 +121,10 @@ class StartpageController extends Controller ...@@ -121,6 +121,10 @@ class StartpageController extends Controller
array_forget($params, 'out'); array_forget($params, 'out');
array_forget($params, 'page'); array_forget($params, 'page');
array_forget($params, 'request'); array_forget($params, 'request');
array_forget($params, 'focus');
array_forget($params, 'encoding');
array_forget($params, 'lang');
$link = action('MetaGerSearch@search', []); $link = action('MetaGerSearch@search', []);
$response = Response::make( $response = Response::make(
...@@ -129,7 +133,7 @@ class StartpageController extends Controller ...@@ -129,7 +133,7 @@ class StartpageController extends Controller
->with('params', $params) ->with('params', $params)
->with('hostname', gethostname()) ->with('hostname', gethostname())
->with('request', $request), "200"); ->with('request', $request), "200");
$response->header('Content-Type', "application/xml"); $response->header('Content-Type', "application/opensearchdescription+xml");
return $response; return $response;
} }
...@@ -146,12 +150,12 @@ class StartpageController extends Controller ...@@ -146,12 +150,12 @@ class StartpageController extends Controller
public function berlin(Request $request) public function berlin(Request $request)
{ {
$link = ""; $link = "";
$password = ""; $password = "";
if ($request->filled('eingabe')) { if ($request->filled('eingabe')) {
$password = getenv('berlin'); $password = getenv('berlin');
$password = md5($request->input('eingabe') . " -host:userpage.fu-berlin.de" . $password); $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') return view('berlin')
->with('title', 'Testseite für die FU-Berlin') ->with('title', 'Testseite für die FU-Berlin')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment