check acutal file
[Pman.Core] / DataObjects / Images.php
index 32a08d3..10089ae 100644 (file)
@@ -203,7 +203,16 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         ));
           
     }
-     
+    
+    /**
+     * does the files exist?
+     */
+    function exists()
+    {
+        return file_exists($this->getStoreName());
+    }
+    
+    
     /**
      * deletes all the image instances of it...
      * 
@@ -504,6 +513,9 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         if (!$this->id) {
             return 'about:blank';
         }
+        if (!$this->exists()) {
+            return 'about:missing';
+        }
         
         $shorten_name = $this->shorten_name();