Code

Updated with skip_write flag
[gosa.git] / include / class_plugin.inc
index 18b8867f459abd084c3ff62b7305e568cc0b2a3c..3d59015a24b6dc343e888fd3cb7877f827d5961b 100644 (file)
@@ -267,7 +267,7 @@ class plugin
   {
     /* Save values to object */
     foreach ($this->attributes as $val){
-      if ($this->acl_is_writable($val) && isset ($_POST["$val"])){
+      if ($this->acl_is_writeable($val) && isset ($_POST["$val"])){
         /* Check for modifications */
         if (get_magic_quotes_gpc()) {
           $data= stripcslashes($_POST["$val"]);
@@ -289,9 +289,9 @@ class plugin
           $data = "";  
         }
         $this->$val= $data;
-        echo "<font color='blue'>".$val."</font><br>";
+        //echo "<font color='blue'>".$val."</font><br>";
       }else{
-        echo "<font color='red'>".$val."</font><br>";
+        //echo "<font color='red'>".$val."</font><br>";
       }
     }
   }
@@ -1399,7 +1399,7 @@ echo "FIXME: remove_snapshot uses old acl's<br>";
   }
 
 
-  function acl_is_writable($attribute)
+  function acl_is_writeable($attribute)
   {
     $ui= get_userinfo();
     return preg_match('/w/', $ui->get_permissions($this->dn, get_class($this), $attribute));
@@ -1432,6 +1432,13 @@ echo "FIXME: remove_snapshot uses old acl's<br>";
     $ui= get_userinfo();
     return preg_match('/m/', $ui->get_permissions($this->dn, get_class($this), '0'));
   }
+
+
+  function getacl($attribute)
+  {
+    $ui= get_userinfo();
+    return  $ui->get_permissions($this->dn, get_class($this), $attribute);
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>