DataObjects/Core_email.php
[Pman.Core] / Images.php
index 1e4a5bc..252cd24 100644 (file)
@@ -2,6 +2,9 @@
 /**
  * Deal with image delivery and HTML replacement of image links in body text.
  *
+ *
+ * NOTE THIS WAS NEVER INTENDED FOR PUBLIC IMAGE DISTRIBUTION - we need to create a seperate file for that...
+ *
  * $str = Pman_Core_Images::replaceImg($str); // < use with HTML
  *
  * or
@@ -41,7 +44,18 @@ class Pman_Core_Images extends Pman
     // tables that do not need authentication checks before serving.
     var $public_image_tables = array();
     
-    
+    var  $sizes = array(
+                '100', 
+                '100x100', 
+                '150', 
+                '150x150', 
+                '200', 
+                '200x0',
+                '200x200',  
+                '400x0',
+                '300x100',
+                '500'
+            );
     function getAuth()
     {
         parent::getAuth(); // load company!
@@ -105,7 +119,7 @@ class Pman_Core_Images extends Pman
         
             $id = empty($bits[0]) ? 0 :  $bits[0];
         }
-        print_R($this);exit;
+        
         if (strpos($id,':') > 0) {  // id format  tablename:id:-imgtype
             
             if (!$this->authUser) {
@@ -271,7 +285,6 @@ class Pman_Core_Images extends Pman
         }
 //        print_r($img);exit;
         $x = $img->toFileConvert();
-        print_R($img);exit;
         if (empty($this->as_mimetype) || $img->mimetype == 'image/gif') {
             $this->as_mimetype  = $img->mimetype;
         }
@@ -326,18 +339,7 @@ class Pman_Core_Images extends Pman
         
         $ff = HTML_FlexyFramework::get();
         
-        $sizes = array(
-                '100', 
-                '100x100', 
-                '150', 
-                '150x150', 
-                '200', 
-                '200x0',
-                '200x200',  
-                '400x0',
-                '300x100',
-                '500'
-            );
+        $sizes= $this->sizes;
         
         $cfg = isset($ff->Pman_Images) ? $ff->Pman_Images :
                 (isset($ff->Pman_Core_Images) ? $ff->Pman_Core_Images : array());