Pman/Images.php
[Pman.Base] / Pman / Images.php
index 0549e4e..8eaaad8 100644 (file)
@@ -82,8 +82,8 @@ class Pman_Images extends Pman
             }
             $img->limit(1);
             if (!$img->find(true)) {
-                header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png');
-                die("no images for that item: " . htmlspecialchars($id));
+                header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
+                urlencode("no images for that item: " . htmlspecialchars($id)));
             }
             
             $id = $img->id;
@@ -107,7 +107,7 @@ class Pman_Images extends Pman
             $img->limit(1);
             if (!$img->find(true)) {
                 header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason='. 
-                    urlencode("No file exists");
+                    urlencode("No file exists"));
             } 
             $id = $img->id;
             
@@ -117,6 +117,7 @@ class Pman_Images extends Pman
        
         $img = DB_DataObjecT::factory('Images');
         if (!$id || !$img->get($id)) {
+            print_r($id);exit;
             header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
                 urlencode("image has been removed or deleted."));
         }
@@ -130,6 +131,7 @@ class Pman_Images extends Pman
     {
         require_once 'File/Convert.php';
         if (!file_exists($img->getStoreName())) {
+            print_r($img);exit;
             header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
                 urlencode("Original file was missing : " . $img->getStoreName()));