From a4186ab0762833a4c4dd741e6dd112185efc2272 Mon Sep 17 00:00:00 2001
From: Fibinger Ádám <adam.fibinger@wup.hu>
Date: Thu, 17 Oct 2019 16:51:42 +0200
Subject: [PATCH] History felület alapok és némi refaktor

---
 form.php |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/form.php b/form.php
index cfa9739..5e543f0 100644
--- a/form.php
+++ b/form.php
@@ -7,7 +7,7 @@
     $s->loadFromArray($_POST['stripe']);
 
     if (!empty($s->getState())) {
-        file_put_contents($last_json, $s->getJson());
+        file_put_contents(STRIPE_JSON, $s->getJson());
     }
 
     $s->setClass('simple');
@@ -23,8 +23,8 @@
     file_put_contents(OVERLAY_DIR . 'team-ban.html', $html_content);
 
 } else {
-    if (file_exists($last_json)) {
-        $raw_json = file_get_contents($last_json);
+    if (file_exists(STRIPE_JSON)) {
+        $raw_json = file_get_contents(STRIPE_JSON);
         $stateArray = json_decode($raw_json, true);
         if (is_array($stateArray)) {
             $s->loadFromArray($stateArray);
@@ -34,8 +34,8 @@
 
 $teams = new \EOG\Models\TeamList();
 
-if (file_exists(OVERLAY_DIR . 'teams.json')) {
-    $teams->fromJson(file_get_contents(OVERLAY_DIR . 'teams.json'));
+if (file_exists(TEAMS_JSON)) {
+    $teams->fromJson(file_get_contents(TEAMS_JSON));
 }
 
 $var = [

--
Gitblit v1.8.0