Fix some layout problems, and caching issues.

This commit is contained in:
tim
2015-11-22 01:43:29 +02:00
parent 925a8572d0
commit 3b8f5e6599
13 changed files with 58 additions and 54 deletions
+7 -1
View File
@@ -1,6 +1,8 @@
<?
require_once(realpath(dirname(__FILE__) . '/open_db.lib.php'));
$is_admin = FALSE;
if (isset($_SERVER['HTTPS'])) {
session_cache_limiter('private');
session_set_cookie_params(strtotime('+1 year'), '/', '.xxx.org.za', TRUE, TRUE);
@@ -10,12 +12,16 @@ if (isset($_SERVER['HTTPS'])) {
$is_admin = TRUE;
$username = $_SESSION['editor'];
} elseif (check_persistent_login()) {
// check_persistent_login() sets $_SESSION['editor']
// Note that check_persistent_login() sets $_SESSION['editor']
$is_admin = TRUE;
$username = $_SESSION['editor'];
} else {
$is_admin = FALSE;
}
// Don't cache if $is_admin is set
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Cache-Control: post-check=0, pre-check=0', false );
header( 'Pragma: no-cache' );
}
function check_persistent_login() {