Code

Updated a couple of values
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_printGeneric.inc
index 68cc78273a1351486ef4d6cfeb4b3c05c38b64d8..46aa1f1f8b472dda1934e45113d3b409b57a2fcb 100644 (file)
@@ -130,7 +130,7 @@ class printgeneric extends plugin
         
           $mem = $this->attrs[$attr][$i];
           if(preg_match("/Group/",$type)){
-            $ldap->search("(&(objectClass=posixGroup)(cn=".$mem."))",array("cn","description"));
+            $ldap->search("(&(|(objectClass=posixGroup)(objectClass=gosaGroupOfNames))(cn=".$mem."))",array("cn","description"));
             if($ldap->count()){
               $entry = $ldap->fetch();
               $this->member[$type][$entry['cn'][0]]=$entry;
@@ -320,7 +320,7 @@ class printgeneric extends plugin
 
     /* If this is a WS / Terminal depending printer, display account state button */
     if(!preg_match("/^Printer$/i",$this->BelongsTo)){
-      if((empty($this->cn)) && ($this->dn != "new")){
+      if($this->cn == "" && ($this->dn != "new")){
         $display= $this->show_enable_header(_("Add printer extension"),
             msgPool::featuresDisabled(_("printer"))._("You can't enable it while 'cn' is not present in entry. Possibly you are currently creating a new terminal template."),TRUE,TRUE);
         $this->is_account= false;
@@ -501,9 +501,8 @@ class printgeneric extends plugin
 
     /* Parse selected ppd file */
     $config = session::get('config');
-    if((isset($config->data['MAIN']['PPD_PATH']))&&(is_dir($config->data['MAIN']['PPD_PATH']))){
-
-      $path = $config->data['MAIN']['PPD_PATH'];
+    if ($config->get_cfg_value("ppdPath") != ""){
+      $path = $config->get_cfg_value("ppdPath");
       if(!preg_match("/\/$/",$path)){
         $path = $path."/";
       }
@@ -667,7 +666,7 @@ class printgeneric extends plugin
     $dn= "cn=".$this->cn.get_ou('printerou').",".$this->base;
 
     /* must: cn */
-    if(($this->BelongsTo == "Printer") && (empty($this->cn))){
+    if(($this->BelongsTo == "Printer") && $this->cn == ""){
       $message[]= msgPool::required(_("Name"));
     }
 
@@ -703,7 +702,7 @@ class printgeneric extends plugin
      */
     if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
       $message[] = msgPool::permCreate();
-    }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
+    }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
       $message[] = msgPool::permMove();
     }