? cacheexclude_get.patch
Index: cacheexclude.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cacheexclude/cacheexclude.module,v
retrieving revision 1.6.2.2
diff -u -p -r1.6.2.2 cacheexclude.module
--- cacheexclude.module	24 Feb 2009 18:18:24 -0000	1.6.2.2
+++ cacheexclude.module	27 May 2009 18:06:49 -0000
@@ -28,13 +28,13 @@ function cacheexclude_admin_settings() {
     '#default_value' => variable_get('cacheexclude_list', ''),
     '#width' => 40,
     '#height' => 10,
-    '#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
+    '#description' => t("Enter one page per line as Drupal paths. Don't begin link with trailing slash. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
   );
-  
+
   // Add an additional submit handler to clear the cache after list is updated.
   $full_form = system_settings_form($form);
   $full_form['#submit'][] = 'cacheexclude_admin_settings_submit';
-  
+
   return $full_form;
 }
 
@@ -48,13 +48,22 @@ function cacheexclude_admin_settings_sub
 
 /**
  * Implementation of hook_init().
+ *
+ * $_GET['q'] should be set by drupal_init_path() already,
+ * but some users have reported that it may not be.
+ * Just to be safe, reinitialize it if it's not already set.
  */
 function cacheexclude_init() {
   $pages = trim(variable_get('cacheexclude_list', ''));
-  // If the current page is one we want to exclude from the cache, 
+
+  if (!$_GET['q']) {
+    drupal_init_path();
+  }
+
+  // If the current page is one we want to exclude from the cache,
   // set the page caching to false temporarily.
   if (strlen($pages) && (drupal_match_path($_GET['q'], $pages) ||
                          drupal_match_path(drupal_get_path_alias($_GET['q']), $pages) )) {
-    $GLOBALS['conf']['cache'] = FALSE;
+    $GLOBALS['conf']['cache'] = 0;
   }
 }
