summaryrefslogtreecommitdiff
path: root/pages/api/fronter.php
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-04-24 14:03:36 +0200
committerRaindropsSys <contact@minteck.org>2023-04-24 14:03:36 +0200
commit633c92eae865e957121e08de634aeee11a8b3992 (patch)
tree09d881bee1dae0b6eee49db1dfaf0f500240606c /pages/api/fronter.php
parentc4657e4509733699c0f26a3c900bab47e915d5a0 (diff)
downloadpluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.gz
pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.bz2
pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.zip
Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated)
Diffstat (limited to 'pages/api/fronter.php')
-rw-r--r--pages/api/fronter.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/pages/api/fronter.php b/pages/api/fronter.php
index 9f70fdc..a908efa 100644
--- a/pages/api/fronter.php
+++ b/pages/api/fronter.php
@@ -1,5 +1,6 @@
<?php
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
if (!$isLoggedIn || $isLowerLoggedIn) {
header("Location: /-/login");
@@ -39,6 +40,8 @@ switch ($type) {
if (!isset($list[$date])) $list[$date] = [];
$list[$date][] = [$member, null];
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
case "cofront":
@@ -57,6 +60,8 @@ switch ($type) {
}
$list[$date][$index][1] = $member;
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
case "delete":
@@ -72,6 +77,8 @@ switch ($type) {
unset($day[$index]);
$list[$date] = array_values($day);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -87,6 +94,8 @@ switch ($type) {
}
$list[$date][$index][1] = null;
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -102,6 +111,8 @@ switch ($type) {
}
moveElement($list[$date], $index, $index + 1 < count($list[$date]) ? $index + 1 : $index);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -117,6 +128,8 @@ switch ($type) {
}
moveElement($list[$date], $index, count($list[$date]) - 1);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -132,6 +145,8 @@ switch ($type) {
}
moveElement($list[$date], $index, $index - 1 > -1 ? $index - 1 : $index);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;
@@ -147,6 +162,8 @@ switch ($type) {
}
moveElement($list[$date], $index, 0);
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}");
+ createJob("RefreshCache", []);
break;