? 354724_check_on_runtime.patch
Index: imagecache.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagecache/imagecache.module,v
retrieving revision 1.68.2.11
diff -u -p -r1.68.2.11 imagecache.module
--- imagecache.module	5 Jan 2009 22:29:52 -0000	1.68.2.11
+++ imagecache.module	13 Apr 2009 21:44:42 -0000
@@ -193,7 +193,7 @@ function imagecache_action_definition($a
 
 /**
  * Return a URL that points to the location of a derivative of the
- * original image at @p $path, transformed with the given @p $preset.
+ * original image transformed with the given preset.
  *
  * Special care is taken to make this work with the possible combinations of
  * Clean URLs and public/private downloads. For example, when Clean URLs are not
@@ -203,14 +203,23 @@ function imagecache_action_definition($a
  *
  * This code is very similar to the Drupal core function file_create_url(), but
  * handles the case of Clean URLs and public downloads differently however.
- */
-function imagecache_create_url($presetname, $path) {
-  $path = _imagecache_strip_file_directory($path);
+ *
+ * @param $presetname
+ * @param $filepath
+ *   String specifying the path to the image file.
+ * @param $bypass_browser_cache
+ *   A Boolean indicating that the URL for the image should be distinct so that
+ *   the visitors browser will not be able to use a previously cached version.
+ *   This is
+ */
+function imagecache_create_url($presetname, $filepath, $bypass_browser_cache = FALSE) {
+  $path = _imagecache_strip_file_directory($filepath);
+  $query = $bypass_browser_cache ? time() : $bypass_browser_cache;
   switch (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC)) {
     case FILE_DOWNLOADS_PUBLIC:
-      return url(file_directory_path() .'/imagecache/'. $presetname .'/'. $path, NULL, NULL, TRUE);
+      return url($GLOBALS['base_url'] . '/' . file_directory_path() .'/imagecache/'. $presetname .'/'. $path, $query, NULL, TRUE);
     case FILE_DOWNLOADS_PRIVATE:
-      return url('system/files/imagecache/'. $presetname .'/'. $path, NULL, NULL, TRUE);
+      return url('system/files/imagecache/'. $presetname .'/'. $path, $query, NULL, TRUE);
   }
 }
 
Index: imagecache_ui.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagecache/imagecache_ui.module,v
retrieving revision 1.11.2.2
diff -u -p -r1.11.2.2 imagecache_ui.module
--- imagecache_ui.module	18 Mar 2009 09:34:21 -0000	1.11.2.2
+++ imagecache_ui.module	13 Apr 2009 21:44:43 -0000
@@ -364,7 +364,7 @@ function imagecache_ui_preset_form($pres
     file_copy($preview_path, 'imagecache_sample.png');
   }
   imagecache_image_flush($preview_path);
-  $imagecache_path = imagecache_create_url($preset['presetname'], $preview_path) .'?'. time();
+  $imagecache_path = imagecache_create_url($preset['presetname'], $preview_path, TRUE);
   $form['preview'] = array(
     '#type' => 'item',
     '#title' => t('Preview'),
