Images.php
[Pman.Core] / Images.php
index 4bc9bb2..65a6537 100644 (file)
@@ -37,6 +37,9 @@
 require_once  'Pman.php';
 class Pman_Core_Images extends Pman
 {
+    
+    var $public_image_table = array();
+    
     function getAuth()
     {
         parent::getAuth(); // load company!
@@ -162,10 +165,10 @@ class Pman_Core_Images extends Pman
              $this->imgErr("image has been removed or deleted.",$s);
         }
         
-        if (!$this->authUser) {
+        if (!$this->authUser && !in_array($img->ontable,$this->public_image_tables)) {
            
             if ($img->ontable != 'core_company') {
-                $this->imgErr("not-authenticated",$s);
+                $this->imgErr("not-authenticated {$img->ontable}",$s);
             }
             if ($img->imgtype != 'LOGO') {
                 $this->imgErr("not-logo",$s);