function authcache_exit in Authenticated User Page Caching (Authcache) 7
Same name and namespace in other branches
- 6 authcache.module \authcache_exit()
- 7.2 authcache.module \authcache_exit()
Implements hook_exit().
Called on drupal_goto() redirect. Make sure status messages show up, if applicable.
File
- ./
authcache.module, line 492 - Authenticated User Page Caching (and anonymous users, too!)
Code
function authcache_exit($destination = NULL) {
global $_authcache_is_cacheable;
// Do not continue if not fully bootstrapped.
if (drupal_get_bootstrap_phase() < DRUPAL_BOOTSTRAP_FULL) {
return;
}
if ($destination !== NULL) {
$_authcache_is_cacheable = FALSE;
// Cookie will inform Authcache not to display cached page on next request
if (drupal_set_message()) {
setcookie('nocache', 1, 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
setcookie('nocache_temp', 1, 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
}
}
//TODO:probably move _authcache_shutdown_save_page() code to here if this works
_authcache_shutdown_save_page();
}