? boost-305071.patch
? boost-640306.patch
? boost-tg.patch
? update_README.patch
? watchdog_boost.module.patch
? words2_boost.admin_.inc_.patch
? words_boost.module.patch
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.258
diff -u -p -r1.3.2.2.2.5.2.258 boost.module
--- boost.module	24 Nov 2009 05:32:55 -0000	1.3.2.2.2.5.2.258
+++ boost.module	26 Nov 2009 04:46:28 -0000
@@ -161,6 +161,13 @@ function boost_views_pre_render(&$view) 
  */
 function boost_init() {
   global $user, $base_path;
+
+  // remove cookie set at logout
+  $uid = isset($user->uid) ? $user->uid : 0;
+  if (isset($_COOKIE[BOOST_COOKIE]) && $uid == 0) {
+    boost_set_cookie($uid, BOOST_TIME - 86400);
+  }
+
   // Disable all caches when nocache is set
   if (isset($_GET['nocache'])) {
     $GLOBALS['conf']['cache'] = CACHE_DISABLED;
@@ -199,7 +206,7 @@ function boost_init() {
   $GLOBALS['_boost_query'] .= str_replace('&amp;', '&', urldecode(http_build_query($query)));
 
   if (!empty($user->uid)) {
-    boost_set_cookie($user);
+    boost_set_cookie($user->uid);
     if (BOOST_DISABLE_CLEAN_URL) {
       $GLOBALS['conf']['clean_url'] = 0;
       db_query('TRUNCATE {cache_filter}');
@@ -804,10 +811,11 @@ function boost_user($op, &$edit, &$accou
     case 'login':
       // Set a special cookie to prevent authenticated users getting served
       // pages from the static page cache.
-      boost_set_cookie($user);
+      boost_set_cookie($user->uid);
       break;
     case 'logout':
-      boost_set_cookie($user, BOOST_TIME - 86400);
+      // set the cookie to 0, then remove at the following request, this way browsers won't show a cached logged in page
+      boost_set_cookie(0);
       break;
     case 'delete':
       // Expire the relevant user page from the static page cache to prevent serving stale content:
@@ -2840,19 +2848,19 @@ function boost_db_is_expired($filename) 
  * Sets a special cookie preventing authenticated users getting served pages
  * from the static page cache.
  *
- * @param $user
- *   User Object
+ * @param $uid
+ *   User ID Number
  * @param $expires
  *   Expiration time
  */
-function boost_set_cookie($user, $expires = NULL) {
+function boost_set_cookie($uid, $expires = NULL) {
   if (!$expires) {
     $expires = ini_get('session.cookie_lifetime');
     $expires = (!empty($expires) && is_numeric($expires)) ? BOOST_TIME + (int)$expires : 0;
-    setcookie(BOOST_COOKIE, $user->uid, $expires, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
+    setcookie(BOOST_COOKIE, strval($uid), $expires, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
   }
   else {
-    setcookie(BOOST_COOKIE, FALSE, $expires, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
+    setcookie(BOOST_COOKIE, '0', $expires, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
   }
   $GLOBALS['_boost_cache_this'] = FALSE;
 }
