DataObjects/Images.php
[Pman.Core] / DataObjects / Images.php
index d9d4cab..cc51a13 100644 (file)
@@ -796,16 +796,16 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         
         require_once 'System.php';
         
+        $file = $this->getStoreName();
+                
+        if(!file_exists($file)){
+            return false;
+        }
+                
         switch ($this->mimetype) {
             
             case 'application/pdf' :
                 
-                $file = $this->getStoreName();
-                
-                if(!file_exists($file)){
-                    return false;
-                }
-                
                 $pdftk = System::which('pdftk');
                 
                 if (empty($pdftk)) {
@@ -824,8 +824,8 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
                         continue;
                     }
                     
-                    print_R($i);exit;
-                    
+                    $ret = (empty($matches[1])) ? false : $matches[1];
+                    break;
                 }
                 
                 break;