Images.php
authorAlan Knowles <alan@roojs.com>
Wed, 23 May 2012 02:53:08 +0000 (10:53 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 23 May 2012 02:53:08 +0000 (10:53 +0800)
Images.php

index 8b6bd11..5d60b05 100644 (file)
@@ -300,28 +300,28 @@ class Pman_Core_Images extends Pman
         if (!empty($attr['width']) || !empty($attr['height']) )
         {
             // no support for %...
-            $new_thumbsize =
+            $thumbsize =
                 (empty($attr['width']) ? '0' : $attr['width'] * 1) .
                 'x' .
                 (empty($attr['height']) ? '0' : $attr['height'] * 1);
             
             
         }
-        if ($new_thumbsize != $thumbsize) {
+        
+        if ($thumbsize !== -1) {
             // change in size..
             // need to regenerate it..
-            if (!$new_thumbsize) {
-                $type = array('Image');
-            } else {
-                
-                $type = array('Image', 'Thumb', $new_thumbsize);
-                
-                $fc = $img->toFileConvert();
-                // make sure it's available..
-                $fc->convert($img->mimetype, $new_thumbsize);
+            
+            $type = array('Images', 'Thumb', $thumbsize);
                 
+            $fc = $img->toFileConvert();
+            // make sure it's available..
+            $fc->convert($img->mimetype, $thumbsize);
+            
             }
             
+        } else {
+            $type = array('Images')
         }