? optional_absolute_paths.patch
Index: imagecache.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagecache/imagecache.module,v
retrieving revision 1.112
diff -r1.112 imagecache.module
310c310,312
<  *   This is
---
>  *   Defaults to FALSE.
>  * @param $absolute
>  *   A Boolean indicating that the URL should be absolute. Defaults to TRUE.
312c314
< function imagecache_create_url($presetname, $filepath, $bypass_browser_cache = FALSE) {
---
> function imagecache_create_url($presetname, $filepath, $bypass_browser_cache = FALSE, $absolute = TRUE) {
318c320
<   $args = array('absolute' => TRUE, 'query' => $bypass_browser_cache ? time() : $bypass_browser_cache);
---
>   $args = array('absolute' => $absolute, 'query' => $bypass_browser_cache ? time() : $bypass_browser_cache);
321c323,324
<       return url($GLOBALS['base_url'] . '/' . file_directory_path() .'/imagecache/'. $presetname .'/'. $path, $args);
---
>       $base = $absolute ? $GLOBALS['base_url'] .'/' : '';
>       return url($base . file_directory_path() ."/imagecache/$presetname/$path", $args);
323c326
<       return url('system/files/imagecache/'. $presetname .'/'. $path, $args);
---
>       return url("system/files/imagecache/$presetname/$path", $args);
820a824,825
>  * @param $absolute
>  *   A Boolean indicating that the URL should be absolute. Defaults to TRUE.
824c829
< function theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) {
---
> function theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE, $absolute = TRUE) {
836c841
<   $imagecache_url = imagecache_create_url($presetname, $path);
---
>   $imagecache_url = imagecache_create_url($presetname, $path, FALSE, $absolute);
