Changed Images.php
authorAlan <alan@roojs.com>
Wed, 4 Jan 2023 07:56:11 +0000 (15:56 +0800)
committerAlan <alan@roojs.com>
Wed, 4 Jan 2023 07:56:11 +0000 (15:56 +0800)
Images.php

index 92e40db..ce7bb26 100644 (file)
@@ -85,6 +85,8 @@ class Pman_Core_Images extends Pman
         //if (!empty($_GET['_post'])) {
         //   return $this->post();
         //}
+        
+        //DB_DataObject::debugLevel(1);
 
         $this->is_local = (!empty($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'localhost') ? true : false;
         
@@ -150,6 +152,7 @@ class Pman_Core_Images extends Pman
             }
             $img->limit(1);
             if (!$img->find(true)) {
+                
                 $this->imgErr("no images for that item: " . htmlspecialchars($id),$s);
                 
             }
@@ -217,6 +220,7 @@ class Pman_Core_Images extends Pman
     }
     
     function imgErr($reason,$path) {
+        
         header('Location: ' . $this->rootURL . '/Pman/templates/images/file-broken.png?reason=' .
             urlencode($reason) .'&path='.urlencode($path));
         exit;
@@ -300,6 +304,8 @@ class Pman_Core_Images extends Pman
                 $x->serveOnly($this->method);
                 exit;
             }
+            $x->debug=1;
+            
             $x->convert( $this->as_mimetype);
             $x->serve($this->method);
             exit;