From 9566a9ebe56ff4c93c8bd90f9ffeb59b46cca6c6 Mon Sep 17 00:00:00 2001 From: Lorenz Schori Date: Mon, 21 Jan 2013 08:11:26 +0100 Subject: [PATCH 2/6] Fix _authcache_is_ajax global variable --- ajax/authcache.php | 3 ++- authcache.helpers.inc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ajax/authcache.php b/ajax/authcache.php index 8e59547..2f48a1b 100644 --- a/ajax/authcache.php +++ b/ajax/authcache.php @@ -44,7 +44,8 @@ if (!$user->uid && isset($_COOKIE['authcache'])) { setcookie('nocache', "", REQUEST_TIME - 86400, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1'); } -$is_ajax_authcache = true; +global $_authcache_is_ajax; +$_authcache_is_ajax = true; // Add your own custom functions to authcache_custom.php and place in your settings.php directory. if (file_exists($authcache_custom_inc = conf_path() . '/authcache_custom.php')) { diff --git a/authcache.helpers.inc b/authcache.helpers.inc index 7999702..c864f79 100644 --- a/authcache.helpers.inc +++ b/authcache.helpers.inc @@ -10,7 +10,7 @@ * Should the current page be cached? */ function _authcache_is_cacheable() { - global $user, $is_ajax_authcache, $_authcache_info, $conf; + global $user, $_authcache_is_ajax, $_authcache_info, $conf; // Do not cache if... if (drupal_is_cli()) { @@ -38,7 +38,7 @@ function _authcache_is_cacheable() { return FALSE; } - if ($is_ajax_authcache) { + if ($_authcache_is_ajax) { $_authcache_info['no_cache_reason'] = 'Authcache Ajax request'; return FALSE; } -- 1.7.10.4