Code

Fixed undefined index
[gosa.git] / plugins / personal / connectivity / class_pureftpdAccount.inc
index fe66e184f6f5d1cce71cd94b2c05f5926b919a56..1bedf3462140673bc870a602b09ef57021fad9a8 100644 (file)
@@ -21,6 +21,7 @@ class pureftpdAccount extends plugin
   var $attributes= array("FTPQuotaFiles","FTPQuotaMBytes","FTPUploadRatio","FTPDownloadRatio",
       "FTPUploadBandwidth","FTPDownloadBandwidth","FTPStatus","FTPuid","FTPgid");
   var $objectclasses= array("PureFTPdUser");
+  var $ReadOnly;
 
   function pureftpdAccount ($config, $dn= NULL)
   {
@@ -44,11 +45,10 @@ class pureftpdAccount extends plugin
     $tmp = $this->plInfo();
     $changeState = "";
     foreach($tmp['plProvidedAcls'] as $key => $desc){
-      $smarty->assign($key."ACL", $this->getacl($key));
-      $smarty->assign($key."_W", $this->acl_is_writeable($key));
+      $smarty->assign($key."ACL", $this->getacl($key,$this->ReadOnly));
+      $smarty->assign($key."_W", $this->acl_is_writeable($key,$this->ReadOnly));
   
       if($this->acl_is_writeable($key)){
-        echo "JOP";
         $changeState.= " changeState('".$key."'); \n";
       }
     }
@@ -70,7 +70,7 @@ class pureftpdAccount extends plugin
     }
     $smarty->assign("use_FTPStatus", ($this->FTPStatus == "disabled") ? "checked" : "");
     
-    if(($this->is_account && $this->acl_is_removeable()) || (!$this->is_account && $this->acl_is_createable())) {
+    if((!$this->ReadOnly)&&(($this->is_account && $this->acl_is_removeable()) || (!$this->is_account && $this->acl_is_createable())) ){
       $smarty->assign('pureftpdACL', "");
     }else{
       $smarty->assign('pureftpdACL', " disabled ");
@@ -146,10 +146,10 @@ class pureftpdAccount extends plugin
       }
 
       if($this->acl_is_writeable("FTPQuotaFiles") && !is_id($this->FTPQuotaFiles)){
-        $message[]= _("Value specified as 'Files' is not valid.");
+        $message[]= _("Value specified as 'Quota files' is not valid.");
       }
       if($this->acl_is_writeable("FTPQuotaMBytes") && !is_id($this->FTPQuotaMBytes)){
-        $message[]= _("Value specified as 'Size' is not valid.");
+        $message[]= _("Value specified as 'Quota size' is not valid.");
       }
       if($this->acl_is_writeable("FTPUploadRatio") && !is_id($this->FTPUploadRatio)){
         $message[]= _("Value specified as 'Upload ratio' is not valid.");