aboutsummaryrefslogtreecommitdiff
path: root/p/i
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-09-05 08:16:52 +0200
committerGravatar GitHub <noreply@github.com> 2025-09-05 08:16:52 +0200
commit858616f075e5a66a5e0973af421a9f300b3b9ce1 (patch)
treea67eb709c387d03b6471a41fd6b76c60ed2334bf /p/i
parent6c9a9ee2266d7fec554d53218a29d121a4a08ee8 (diff)
Fixes for no-cache.txt (#7907)
* Closes and fixes error from #7885 * `no-cache.txt` is now respected in `f.php`, `ext.php` and `serve` action in `extensionController` * And in all other places that weren't checking for `no-cache.txt` (some extensions maybe)
Diffstat (limited to 'p/i')
-rw-r--r--p/i/index.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/p/i/index.php b/p/i/index.php
index 96c8e52fb..55846b952 100644
--- a/p/i/index.php
+++ b/p/i/index.php
@@ -35,17 +35,16 @@ if (!file_exists($applied_migrations_path)) {
Minz_Session::init('FreshRSS');
Minz_Session::_param('keepAlive', 1); //To prevent the PHP session from expiring
- if (!file_exists(DATA_PATH . '/no-cache.txt')) {
- require(LIB_PATH . '/http-conditional.php');
- $currentUser = Minz_User::name();
- $dateLastModification = $currentUser === null ? time() : max(
- FreshRSS_UserDAO::ctime($currentUser),
- FreshRSS_UserDAO::mtime($currentUser),
- @filemtime(DATA_PATH . '/config.php') ?: 0
- );
- if (httpConditional($dateLastModification ?: time(), 0, 0, false, PHP_COMPRESSION, true)) {
- exit(); //No need to send anything
- }
+ require(LIB_PATH . '/http-conditional.php');
+ $currentUser = Minz_User::name();
+ $dateLastModification = $currentUser === null ? time() : max(
+ FreshRSS_UserDAO::ctime($currentUser),
+ FreshRSS_UserDAO::mtime($currentUser),
+ @filemtime(DATA_PATH . '/config.php') ?: 0
+ );
+ if (!file_exists(DATA_PATH . '/no-cache.txt')
+ && httpConditional($dateLastModification ?: time(), 0, 0, false, PHP_COMPRESSION, true)) {
+ exit(); //No need to send anything
}
$error = false;