DataObjects/Core_group.php
[Pman.Core] / Images.php
index 63165b4..5a8bed3 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!
@@ -167,7 +181,7 @@ class Pman_Core_Images extends Pman
         $img = DB_DataObjecT::factory('Images');
          
         if (!$id || !$img->get($id)) {
-             $this->imgErr("image has been removed or deleted.",$s);
+            $this->imgErr("image has been removed or deleted.",$s);
         }
         
         if (!$this->authUser && !in_array($img->ontable,$this->public_image_tables)) {
@@ -186,7 +200,7 @@ class Pman_Core_Images extends Pman
         
             
         }
-        print_r('run??');exit;
+        
         
         if(!$this->hasPermission($img)){
             $this->imgErr("access to this image/file has been denied.",$s);
@@ -325,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());