summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--imagecache.module4
1 files changed, 4 insertions, 0 deletions
diff --git a/imagecache.module b/imagecache.module
index 59f6ea1..0c4f8b9 100644
--- a/imagecache.module
+++ b/imagecache.module
@@ -103,6 +103,10 @@ function imagecache_cache() {
break;
case 'scale':
+ // set width and height to impossibly large values if unset. allows scaling by only
+ // specifying a single dimension.
+ $action['data']['width'] = $action['data']['width'] ? $action['data']['width'] : 9999999;
+ $action['data']['height'] = $action['data']['height'] ? $action['data']['height'] : 9999999;
if (!image_scale($tmpdestination, $tmpdestination, $action['data']['width'], $action['data']['height'])) {
watchdog('imagecache', t('Imagecache scale action ID %id failed.', array('%id' => $action['actionid'])), WATCHDOG_ERROR);
}