#89103 by quicksketch, allow scaling on a single dimension.
authorDarrel O\'Pry
Wed, 29 Nov 2006 07:57:58 +0000 (07:57 +0000)
committerDarrel O\'Pry
Wed, 29 Nov 2006 07:57:58 +0000 (07:57 +0000)
imagecache.module

index 41abbc6..450463a 100644 (file)
@@ -110,6 +110,9 @@ function imagecache_cache() {
           break;
       
         case 'scale':
+          // set impossibly large values if the width and height aren't set.
+          $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);
           }