Code

Updated a couple of values
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_printGeneric.inc
index 3c0a3053d0becfa3308ef39b531d3264a5087170..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"));
     }