From 8fabf77b2a7720a357c63817c07035a9908818a0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 10 Nov 2021 17:53:50 +0100 Subject: Update --- Neutron-trunk/api/engine-cyclic/includes/cache.php | 70 ---------------------- .../api/engine-cyclic/includes/getPageContent.php | 14 ----- .../api/engine-cyclic/includes/getPageName.php | 18 ------ .../api/engine-cyclic/includes/includes.php | 4 -- 4 files changed, 106 deletions(-) delete mode 100644 Neutron-trunk/api/engine-cyclic/includes/cache.php delete mode 100644 Neutron-trunk/api/engine-cyclic/includes/getPageContent.php delete mode 100644 Neutron-trunk/api/engine-cyclic/includes/getPageName.php delete mode 100644 Neutron-trunk/api/engine-cyclic/includes/includes.php (limited to 'Neutron-trunk/api/engine-cyclic/includes') diff --git a/Neutron-trunk/api/engine-cyclic/includes/cache.php b/Neutron-trunk/api/engine-cyclic/includes/cache.php deleted file mode 100644 index 80ea283..0000000 --- a/Neutron-trunk/api/engine-cyclic/includes/cache.php +++ /dev/null @@ -1,70 +0,0 @@ -list; - } - - // Check if there is (at least) one widget that disables cache - foreach ($list as $widget) { - $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/widgets/$widget/feature.json")); - if (json_last_error() == JSON_ERROR_NONE) { - if (isset($data->cache)) { - if (is_bool($data->cache)) { - $cache = $data->cache; - if ($data->cache == false) { - rlgps("Widget \"$widget\" prevents the use of cache"); - } - } - } - } else { - rlgps("Warning: Metadata for the widget \"$widget\" is corrupted"); - } - } - - // Check if an update has been installed - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/last_version")) { - if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/last_version") == file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/version")) {} else { - $cache = false; - require $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_content_reset.php"; - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/last_version", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/version")); - } - } else { - $cache = false; - require $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_content_reset.php"; - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/last_version", file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/api/version")); - } - - // Is there any widget that disables cache? - if ($cache) { // no - // Does the cached version exists? - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/page-" . $page)) { // yes - header("X-FNS-NeutronCache: yes"); - echo(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/page-" . $page)); // So let's output it - require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/debug.php";debugDump(); // And debug if needed - return true; - } else { // no - header("X-FNS-NeutronCache: no"); - return false; // Let the engine-cyclic render the page - } - } else { // yes - header("X-FNS-NeutronCache: no"); - return false; // Let the engine-cyclic render the page - } */ - - // Cache is now completely disabled due to problems - return false; -} \ No newline at end of file diff --git a/Neutron-trunk/api/engine-cyclic/includes/getPageContent.php b/Neutron-trunk/api/engine-cyclic/includes/getPageContent.php deleted file mode 100644 index 31b202c..0000000 --- a/Neutron-trunk/api/engine-cyclic/includes/getPageContent.php +++ /dev/null @@ -1,14 +0,0 @@ -