Procházet zdrojové kódy

Merge pull request #52 from rix1337/master

If it's stupid, but it works: it's not stupid.
causefx před 9 roky
rodič
revize
ef7c34fc95
2 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. 2 2
      settings.php
  2. 4 4
      user.php

+ 2 - 2
settings.php

@@ -1035,7 +1035,7 @@ endif;
                                                     
                                                     <?php
                                                     
-                                                        $getFailLog = file_get_contents(FAIL_LOG); 
+                                                        $getFailLog = str_replace("\r\ndate", "date", file_get_contents(FAIL_LOG));
                                                         $gotFailLog = json_decode($getFailLog, true);
 
                                                         function getColor($colorTest){
@@ -1851,4 +1851,4 @@ endif;
 
     </body>
 
-</html>
+</html>

+ 4 - 4
user.php

@@ -593,7 +593,7 @@ EOT;
                 
                 if(file_exists(FAIL_LOG)) { 
                     
-                    $getFailLog = file_get_contents(FAIL_LOG); 
+                    $getFailLog = str_replace("\r\ndate", "date", file_get_contents(FAIL_LOG));
                     
                     $gotFailLog = json_decode($getFailLog, true);
                 
@@ -607,11 +607,11 @@ EOT;
 
                     array_push($gotFailLog["auth"], $failLogEntry);
                     
-                    $writeFailLog = json_encode($gotFailLog);
+                    $writeFailLog = str_replace("date", "\r\ndate", json_encode($gotFailLog));
 
                 }else{
 
-                    $writeFailLog = json_encode($failLogEntryFirst);
+                    $writeFailLog = str_replace("date", "\r\ndate", json_encode($failLogEntryFirst));
 
                 }
                 
@@ -833,4 +833,4 @@ EOT;
 			return $string;
 		}
 	}
-?>
+?>