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 ...@@ -22,11 +22,6 @@ class MetaGerSearch extends Controller
$timings = ['starttime' => microtime(true)]; $timings = ['starttime' => microtime(true)];
} }
$time = 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"); $focus = $request->input("focus", "web");
...@@ -41,17 +36,6 @@ class MetaGerSearch extends Controller ...@@ -41,17 +36,6 @@ class MetaGerSearch extends Controller
return redirect(LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/')); 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: # Mit gelieferte Formulardaten parsen und abspeichern:
$metager->parseFormData($request); $metager->parseFormData($request);
if (!empty($timings)) { if (!empty($timings)) {
...@@ -70,12 +54,6 @@ class MetaGerSearch extends Controller ...@@ -70,12 +54,6 @@ class MetaGerSearch extends Controller
return $metager->createView(); 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(); $quicktips = $metager->createQuicktips();
if (!empty($timings)) { if (!empty($timings)) {
$timings["createQuicktips"] = microtime(true) - $time; $timings["createQuicktips"] = microtime(true) - $time;
...@@ -143,13 +121,6 @@ class MetaGerSearch extends Controller ...@@ -143,13 +121,6 @@ class MetaGerSearch extends Controller
# Die Ausgabe erstellen: # Die Ausgabe erstellen:
$resultpage = $metager->createView($quicktipResults); $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)) { if (!empty($timings)) {
$timings["createView"] = microtime(true) - $time; $timings["createView"] = microtime(true) - $time;
......
...@@ -113,10 +113,6 @@ spec: ...@@ -113,10 +113,6 @@ spec:
mountPath: /html/database/seeds/UsersSeeder.php mountPath: /html/database/seeds/UsersSeeder.php
subPath: UsersSeeder.php subPath: UsersSeeder.php
readOnly: true readOnly: true
- name: env-files
mountPath: /html/config/spam.txt
subPath: spam.txt
readOnly: true
- name: sumas - name: sumas
mountPath: /html/config/sumas.json mountPath: /html/config/sumas.json
subPath: 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