? 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	19 May 2009 21:47:06 -0000
@@ -30,11 +30,11 @@ function cacheexclude_admin_settings() {
     '#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>')),
   );
-  
+
   // 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;
 }
 
@@ -46,15 +46,29 @@ function cacheexclude_admin_settings_sub
   cache_clear_all(NULL, 'cache_page', '*');
 }
 
+function curPageURL() {
+ $pageURL = 'http';
+ if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
+ $pageURL .= "://";
+ if ($_SERVER["SERVER_PORT"] != "80") {
+  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
+ } else {
+  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
+ }
+ return $pageURL;
+}
+
 /**
  * Implementation of hook_init().
  */
 function cacheexclude_init() {
   $pages = trim(variable_get('cacheexclude_list', ''));
-  // If the current page is one we want to exclude from the cache, 
+  //If the page does not submit q then just pull the URI
+  $q = $_GET['q'] ? $_GET['q'] : $_SERVER["REQUEST_URI"];
+  // 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) )) {
+  if (strlen($pages) && (drupal_match_path($q, $pages) ||
+                         drupal_match_path(drupal_get_path_alias($q), $pages) )) {
     $GLOBALS['conf']['cache'] = FALSE;
   }
 }
