Commit 7f2c881f authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

removed spam file

parent f0b6f677
......@@ -22,11 +22,6 @@ class MetaGerSearch extends Controller
$timings = ['starttime' => microtime(true)];
}
$time = microtime(true);
$spamEntries = [];
$spamEntry = null;
if (file_exists(config_path('spam.txt'))) {
$spamEntries = file(config_path('spam.txt'));
}
$focus = $request->input("focus", "web");
......@@ -41,17 +36,6 @@ class MetaGerSearch extends Controller
return redirect(LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/'));
}
foreach ($spamEntries as $index => $entry) {
$entry = trim($entry);
if (empty($entry)) {
continue;
}
if (preg_match("/" . $entry . "/si", $eingabe)) {
$spamEntry = $entry;
break;
}
}
# Mit gelieferte Formulardaten parsen und abspeichern:
$metager->parseFormData($request);
if (!empty($timings)) {
......@@ -70,12 +54,6 @@ class MetaGerSearch extends Controller
return $metager->createView();
}
if ($spamEntry !== null && Cache::has('spam.' . $metager->getFokus() . "." . md5($spamEntry))) {
$responseContent = Cache::get('spam.' . $metager->getFokus() . "." . md5($spamEntry));
$responseContent = preg_replace('/(name="eingabe"\s+value=")[^"]+/', "$1$eingabe", $responseContent);
return response($responseContent);
}
$quicktips = $metager->createQuicktips();
if (!empty($timings)) {
$timings["createQuicktips"] = microtime(true) - $time;
......@@ -143,13 +121,6 @@ class MetaGerSearch extends Controller
# Die Ausgabe erstellen:
$resultpage = $metager->createView($quicktipResults);
if ($spamEntry !== null) {
try {
Cache::put('spam.' . $metager->getFokus() . "." . md5($spamEntry), $resultpage->render(), 604800);
} catch (\Exception $e) {
Log::error($e->getMessage());
}
}
if (!empty($timings)) {
$timings["createView"] = microtime(true) - $time;
......
......@@ -113,10 +113,6 @@ spec:
mountPath: /html/database/seeds/UsersSeeder.php
subPath: UsersSeeder.php
readOnly: true
- name: env-files
mountPath: /html/config/spam.txt
subPath: spam.txt
readOnly: true
- name: sumas
mountPath: /html/config/sumas.json
subPath: sumas.json
......
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