DataObjects/Images.php
authorAlan Knowles <alan@akbkhome.com>
Thu, 23 Feb 2012 23:15:10 +0000 (07:15 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 23 Feb 2012 23:15:10 +0000 (07:15 +0800)
DataObjects/Images.php

index f90dffe..dd1554d 100644 (file)
@@ -385,13 +385,21 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
         
     }
     
-    
+    /**
+     *
+     *
+     *
+     */
     
     
     function setFromRoo($ar, $roo)
     {
         // not sure why we do this.. 
         
+        
+        
+        
+        
         // if imgtype starts with '-' ? then we set the 'old' (probably to delete later)
         if (!empty($ar['imgtype']) && !empty($ar['ontable']) && !empty($ar['onid']) && ($ar['imgtype'][0] == '-')) {
             $this->setFrom($ar);
@@ -424,12 +432,14 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
          
         
         // FIXME - we should be checking perms here...
-        //if (method_exists($x, 'checkPerm') && !$x->checkPerm('E', $this->authUser))  {
-        //    $this->jerr("PERMISSION DENIED");
-        // }
+       
         // this should be doign update
         $this->setFrom($ar);
         
+        if (method_exists(this, 'checkPerm') && !$this->checkPerm('E', $this->authUser))  {
+            $this->jerr("IMAGE UPLOAD PERMISSION DENIED");
+        }
+        
         if (!isset($_FILES['imageUpload'])) {
             return; // standard update...
         }