Fix some layout problems, and caching issues.
This commit is contained in:
+7
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user