diff --git a/functions.php b/functions.php index 8491809..7b84b80 100644 --- a/functions.php +++ b/functions.php @@ -1,7 +1,7 @@ 'success', 'message' => 'OK']); +function return_success($msg = 'OK') { + return json_encode(['status' => 'success', 'message' => $msg]); } function return_error($code, $msg) { diff --git a/index.php b/index.php index c5aac2e..013f405 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,8 @@ use Twig\Loader\FilesystemLoader; $loader = new FilesystemLoader(__DIR__ . '/templates'); $twig = new Environment($loader); +setlocale(LC_ALL, 'de-DE'); + // -------------- $dbconn = pg_connect($dbconnstring) diff --git a/templates/index.html.twig b/templates/index.html.twig index 8a0caef..9c743fa 100644 --- a/templates/index.html.twig +++ b/templates/index.html.twig @@ -5,17 +5,18 @@ {% block content %} {% if tests is not empty %} -
{{ test.timestamp }} |
{{ test.timestamp | date('D j. M Y, H:i:s') }} |
Keine Tests gefunden.+
Keine Tests gefunden.