Code

Removed debug output
[gosa.git] / plugins / admin / groups / class_groupGeneric.inc
index 05d8181e44474bd8f1def33ad977af4391966f21..eb0345a3993a4fcc3d4b1c1f5d2dfeb86d8132c1 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 class group extends plugin
 {
   /* CLI vars */
@@ -48,13 +49,6 @@ class group extends plugin
   {
     plugin::plugin ($config, $dn);
 
-    /* remove Release Tag if we have release management enabled 
-     */
-    $tmp = search_config($config->data,"faiManagement","CLASS");
-    if(!empty($tmp)){
-      $this->description = preg_replace("/\(.*\)$/","",$this->description);
-    }
-  
     /* Load attributes depending on the samba version */
     $this->samba3= ($config->current['SAMBAVERSION'] == 3);
     $this->orig_dn= $dn;
@@ -220,7 +214,7 @@ class group extends plugin
     foreach($_POST as $name => $value){
       if(preg_match("/^chooseBase/",$name) && $once){
         $once = false;
-        $this->dialog = new baseSelectDialog($this->config);
+        $this->dialog = new baseSelectDialog($this->config,$this);
         $this->dialog->setCurrentBase($this->base);
       }
     }
@@ -427,6 +421,7 @@ class group extends plugin
       }
     }
     if(!empty($filter)){    
+      $ldap->cd($this->config->current['BASE']);
       $ldap->search("(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(|".$filter."))",array("uid","sn","givenName"));
       while($attrs = $ldap->fetch()){
         $this->members[$attrs['uid'][0]] = $this->createResultName($attrs);
@@ -498,7 +493,7 @@ class group extends plugin
 
     $ldap= $this->config->get_ldap_link();
     $ldap->rmdir($this->dn);
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/generic with dn '%s' failed."),$this->dn));
 
     /* Delete references to object groups */
     $ldap->cd ($this->config->current['BASE']);
@@ -581,24 +576,6 @@ class group extends plugin
       }
     }
   
-    /* If release management is enabled .... 
-        Append release name to description tag ..
-       #FIXME release name within description is a very bad solution, use ldap attribute instead
-     */
-    $tmp = search_config($this->config->data,"faiManagement","CLASS");
-    if(!empty($tmp)){
-      if(isset($this->parent)){
-        if(isset($this->parent->by_object['appgroup'])){
-          $baseObj = $this->parent->by_object['appgroup'];
-          if($baseObj->is_account){
-            if(isset($baseObj->Release)){
-              $this->description .= " (".trim($baseObj->Release).")";
-            }
-          }
-        }
-      }
-    }
-
     plugin::save(); 
 
     /* Remove objectClass for samba/phone support */
@@ -688,7 +665,7 @@ class group extends plugin
 
     /* Save data. Using 'modify' implies that the entry is already present, use 'add' for
        new entries. So do a check first... */
-    $ldap->cat ($this->dn);
+    $ldap->cat ($this->dn, array('dn'));
     if ($ldap->fetch()){
       /* Modify needs array() to remove values :-( */
       if (!count ($this->memberUid)){
@@ -713,7 +690,7 @@ class group extends plugin
     $ldap->$mode($this->attrs);
 
     $ret= 0;
-    if (show_ldap_error($ldap->get_error())){
+    if ( show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/generic with dn '%s' failed."),$this->dn))){
       $ret= 1;
     }