Code

Fixed resolution string
[gosa.git] / plugins / personal / environment / class_environment.inc
index d8de502df30c4b128b1d5c14340466ca06c41a37..ab12080b1870a6ebabe5482e4f8b9df91f4dd591 100644 (file)
@@ -206,7 +206,7 @@ class environment extends plugin
                                     "640x480"   =>  "640x480",
                                     "800x600"   =>  "800x600",
                                     "1024x768"  =>  "1024x768",
-                                    "1154x864"  =>  "1154x864",
+                                    "1152x864"  =>  "1152x864",
                                     "1280x768"  =>  "1280x768",
                                     "1280x1024" =>  "1280x1024");
 
@@ -257,12 +257,7 @@ class environment extends plugin
     }
 
     /* Prepare ACL settings*/
-    if(chkacl($this->acl,$s_attr)=="") {
-      $smarty->assign($s_attr."ACL","");
-    }else{
-      $smarty->assign($s_attr."ACL"," disabled ");
-    }
-
+    $smarty->assign($s_attr."ACL",$this->getacl($s_attr));
   }
 
   /* Is accout enabled | are we editing from usermenu or admin menu 
@@ -373,42 +368,25 @@ class environment extends plugin
       }
     
       /* Prepare ACL settings*/
-      if(chkacl($this->acl,$s_attr)=="") {
-        $smarty->assign($s_attr."ACL","");
-      }else{
-        $smarty->assign($s_attr."ACL"," disabled ");
-      }
+      $smarty->assign($s_attr."ACL",$this->getacl($s_attr));
  
     }
 
-    foreach(array("gotoHotplugDevice","gotoPrinterSel") as $s_attr){
-      if(chkacl($this->acl,$s_attr)=="") {
-        $smarty->assign($s_attr."ACL","");
-      }else{
-        $smarty->assign($s_attr."ACL"," disabled ");
-      }
+    foreach(array("gotoHotplugDevice","gotoProfileFlagC","gotoProfileFlagL") as $s_attr){
+      $smarty->assign($s_attr."ACL",$this->getacl($s_attr));
     }
 
     if(empty($this->useProfile)){
-      $smarty->assign("gotoProfileACL","disabled");
       $smarty->assign("useProfileCHK","");
+      $smarty->assign("gotoProfileServerACL" , preg_replace("/w/","",$this->getacl("gotoProfileServer")));
+      $smarty->assign("gotoProfileQuotaACL" , preg_replace("/w/","",$this->getacl("gotoProfileQuota")));
+      $smarty->assign("gotoProfileFlagCACL" , preg_replace("/w/","",$this->getacl("gotoProfileFlagC")));
     }else{
-      $smarty->assign("gotoProfileACL","");
       $smarty->assign("useProfileCHK"," checked ");
     }
-
-    $smarty->assign("useProfileACL","");
-    if($this->acl != "#none#"){
-      $smarty->assign("useProfileACL","");
-      $smarty->assign("gotoProfileFlagCACL"," ");
-      $smarty->assign("gotoProfileQuotaACL"," ");
-    }else{
-      $smarty->assign("gotoProfileFlagCACL"," disabled ");
-      $smarty->assign("useProfileACL","disabled");
-      $smarty->assign("gotoProfileServer"," disabled ");
-      $smarty->assign("gotoProfileQuotaACL"," disabled ");
-    }
+   
+     
+    $smarty->assign("gotoProfileACL", $this->getacl("gotoProfileServer").$this->getacl("gotoProfileQuota"));
 
     /* HANDLE Profile Settings here 
      * Assign available Quota and resolution settings
@@ -789,19 +767,6 @@ class environment extends plugin
       }
       return($disp);
     }
-    if($this->acl != "#none#"){
-      $smarty->assign("useProfileACL","");
-    }else{
-      $smarty->assign("gotoProfileFlagCACL"," disabled ");
-      $smarty->assign("gotoProfileServerACL"," disabled ");
-      $smarty->assign("gotoProfileQuotaACL"," disabled ");
-    }
-
-    if(!$this->useProfile){
-      $smarty->assign("gotoProfileFlagCACL"," disabled ");
-      $smarty->assign("gotoProfileServerACL"," disabled ");
-      $smarty->assign("gotoProfileQuotaACL"," disabled ");
-    }
 
     /* Als smarty vars are set. Get smarty template and generate output */
     $display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));
@@ -951,12 +916,6 @@ class environment extends plugin
       }
     }
 
-
-    /* Save usersettings to Printer */
-    if(chkacl($this->acl,"gotoPrinter")!=""){
-      $this->gotoPrinter = array();
-    }  
-    
     /* 1. Search all printers that have our uid/cn as member 
      * 2. Delete this uid/cn from every single entry and save it again.
      * 2.1 There are different types of members: Users / Groups, this will be defined in $suffix
@@ -1056,14 +1015,6 @@ class environment extends plugin
       $this->attrs['gotoProfileServer']= array(); 
     }
 
-    foreach($this->attributes as $s_attr){
-      if(chkacl($this->acl,$s_attr)!="") {
-        if(isset($this->attrs[$s_attr])){
-          unset($this->attrs[$s_attr]);
-        }
-      }
-    }
-
     $ldap->cat ($this->dn, array('dn'));
     if ($ldap->fetch()){
       $mode= "modify";
@@ -1163,16 +1114,20 @@ function printOutHotPlugDevices()
                                                                         "description" => _("Command to extend the list of possible screen resolutions"))),
 
                   "plProvidedAcls"  => array(
-                    "gotoProfileServer"   => _("Profile server") ,
+
                     "gotoProfileFlagL"    => _("Resolution changeable during session") ,
                     "gotoProfileFlagC"    => _("Cache profile localy") ,
-                    "gotoXResolution"     => _("Resolution") ,
+
                     "gotoProfileQuota"    => _("Profile quota") ,
-                    "gotoLogonScripts"    => _("Logon script") ,
-                    "gotoPrinter"         => _("Printer") ,
-                    "gosaDefaultPrinter"  => _("Default printer") ,
+                    "gotoProfileServer"   => _("Profile server") ,
+
+                    "gotoXResolution"     => _("Resolution") ,
                     "gotoKioskProfile"    => _("Kiosk profile") ,
-                    "gotoShare"           => _("Shares")),
+
+                    "gosaDefaultPrinter"  => _("Default printer") ,
+                    "gotoLogonScript"     => _("Logon script") ,
+                    "gotoHotplugDevice"   => _("Hotplug devices"),
+                    "gotoShare"           => _("Shares"))
                    ));
     }
 }