Commit b581a2fa authored by Aria Givi's avatar Aria Givi
Browse files

Grundstein zum Überprüfen der Änderungen gesetzt

parent 9c92eeb2
...@@ -121,7 +121,6 @@ class MailController extends Controller ...@@ -121,7 +121,6 @@ class MailController extends Controller
public function isEdited($k, $v, $filename) public function isEdited($k, $v, $filename)
{ {
$temp = include resource_path()."/".$filename; $temp = include resource_path()."/".$filename;
foreach ($temp as $key => $value) { foreach ($temp as $key => $value) {
if($k === $key && $v !== $value) { if($k === $key && $v !== $value) {
return true; return true;
...@@ -219,6 +218,7 @@ class MailController extends Controller ...@@ -219,6 +218,7 @@ class MailController extends Controller
public function downloadModifiedLanguagefiles(Request $request, $exclude = "") { public function downloadModifiedLanguagefiles(Request $request, $exclude = "") {
$filename = $request->input('filename'); $filename = $request->input('filename');
# Wir erstellen nun zunächst den Inhalt der Datei: # Wir erstellen nun zunächst den Inhalt der Datei:
$data = []; $data = [];
...@@ -230,17 +230,15 @@ class MailController extends Controller ...@@ -230,17 +230,15 @@ class MailController extends Controller
if ($key === "filename" || $value === "") { if ($key === "filename" || $value === "") {
continue; continue;
} }
if($key === "email") {
$emailAddress = $value;
continue;
}
$key = base64_decode($key); $key = base64_decode($key);
#Pfad zur Datei anhand des Schlüsselnamens rekonstruieren (Schlüssel enthält Sprachkürzel)
$filename = "languages/".substr($key, strpos($key, "/_\w\w_/"), strripos($key, "_"))."/".$filename;
if (strpos($key, "_new_") === 0 && $value !== "") { if (strpos($key, "_new_") === 0 && $value !== "") {
$new++; $new++;
$key = substr($key, strpos($key, "_new_") + 5); $key = preg_filter("/_\w*_/", "", $key);
$editedKeys = $editedKeys."\n".$key; $editedKeys = $editedKeys."\n".$key;
} }
else if ($this->isEdited($key, $value, $filename)) { else if ($this->isEdited($key, $value, $filename)) {
$new++; $new++;
$editedKeys = $editedKeys."\n".$key; $editedKeys = $editedKeys."\n".$key;
...@@ -293,8 +291,6 @@ class MailController extends Controller ...@@ -293,8 +291,6 @@ class MailController extends Controller
} }
// var_dump($ex);
//die();
$ex = base64_encode(serialize($ex)); $ex = base64_encode(serialize($ex));
return redirect(url('synoptic', ['exclude' => $ex])); return redirect(url('synoptic', ['exclude' => $ex]));
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
<tr> <!--Key --> <tr> <!--Key -->
<td class="name language-name">{{preg_replace("/(\s*).*#(.*)$/si", "$1$2", $key)}}</td> <td class="name language-name">{{preg_replace("/(\s*).*#(.*)$/si", "$1$2", $key)}}</td>
@foreach($language as $lang => $languageValue) @foreach($language as $lang => $languageValue)
@if($lang === "de") @if($languageValue !== "")
<td> <td>
<textarea class="language-text-area" rows="1" readonly cols="20" form="submit" name="{{base64_encode("_new_".$lang."_".$key)}}">{{ $languageValue }} </textarea> <textarea class="language-text-area" rows="1" readonly cols="20" form="submit" name="{{base64_encode($lang."_".$key)}}">{{ $languageValue }} </textarea>
</td> </td>
@else @else
<td> <td>
......
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