Pman/Images.php
authorAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 05:12:05 +0000 (13:12 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 05:12:05 +0000 (13:12 +0800)
Pman/Images.php

index 8ec631a..2a47586 100644 (file)
@@ -106,6 +106,7 @@ class Pman_Images extends Pman
             
             $img->limit(1);
             if (!$img->find(true)) {
+                header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png');
                 die("No file exists");
             } 
             $id = $img->id;
@@ -116,6 +117,7 @@ class Pman_Images extends Pman
        
         $img = DB_DataObjecT::factory('Images');
         if (!$id || !$img->get($id)) {
+            header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png');
             die("image has been removed or deleted.");
         }
         $this->serve($img);