Images.php
[Pman.Core] / Images.php
index 146c533..fc1294d 100644 (file)
@@ -218,9 +218,9 @@ class Pman_Core_Images extends Pman
     }
     
     function imgErr($reason,$path) {
-        header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
-            urlencode($reason));
-        echo $path;
+        header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' . urlencode($reason) );
+        header('X-Error: ' . $reason . ':' . $path);
+        echo $reason . ':' . $path;
         exit;
     }
     
@@ -286,12 +286,8 @@ class Pman_Core_Images extends Pman
     {
         $this->sessionState(0); // turn off session... - locking...
         require_once 'File/Convert.php';
-        if (!file_exists($img->getStoreName())) {
-            
-            header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=missing-image-see-original-response');
-            echo "Original file was missing : " . $img->getStoreName();
-            exit;
-          
+        if (!$img->exists()) {
+            $this->imgErr("serve = missing-image", $img->getStoreName());
              
         }
 //        print_r($img);exit;