aboutsummaryrefslogtreecommitdiff
path: root/p/i/index.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-30 15:00:41 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-30 15:00:41 +0100
commitbd5d7a7bcb16cff1c01f4445ceee765fc11e3b50 (patch)
tree1839dbb208d1b63c034fce2cb3d646124a6c937c /p/i/index.php
parent4d6ab45b03031e1c13ac2d3589364a43a0fe5578 (diff)
Cache HTTP compatible multi-utilisateur
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
Diffstat (limited to 'p/i/index.php')
-rwxr-xr-xp/i/index.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/p/i/index.php b/p/i/index.php
index 8d9343a30..3dcf659c9 100755
--- a/p/i/index.php
+++ b/p/i/index.php
@@ -22,22 +22,23 @@ if (file_exists ('install.php')) {
require('install.php');
} else {
require('../../constants.php');
+ require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
session_cache_limiter('');
+ Minz_Session::init('FreshRSS');
+
if (!file_exists(DATA_PATH . '/no-cache.txt')) {
- require (LIB_PATH . '/http-conditional.php');
- $dateLastModification = max(
- @filemtime(DATA_PATH . '/touch.txt'),
+ require(LIB_PATH . '/http-conditional.php');
+ $currentUser = Minz_Session::param('currentUser', '');
+ $dateLastModification = $currentUser === '' ? time() : max(
+ @filemtime(LOG_PATH . '/' . $currentUser . '.log'),
@filemtime(DATA_PATH . '/config.php')
);
- $_SERVER['QUERY_STRING'] .= '&utime=' . file_get_contents(DATA_PATH . '/touch.txt'); //For ETag
if (httpConditional($dateLastModification, 0, 0, false, false, true)) {
exit(); //No need to send anything
}
}
- require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
-
try {
$front_controller = new FreshRSS();
$front_controller->init ();