Code

Fixed baseSelectDialog parameters
[gosa.git] / plugins / admin / ogroups / class_ogroup.inc
index b961cf339073737b8d5bbc542dd4c31fc2ca793e..2e2faa8bc535f5355d0336a02df43056b1d3e737 100644 (file)
@@ -81,8 +81,8 @@ class ogroup extends plugin
     }
     register_global("ogfilter", $ogfilter);
   
-    if(isset($_SESSION['ogroupfilter']['depselect'])){
-     $this->base = $_SESSION['ogroupfilter']['depselect'];
+    if(isset($_SESSION['CurrentMainBase'])){
+     $this->base = $_SESSION['CurrentMainBase'];
     }
 
      /* set permissions */
@@ -181,7 +181,7 @@ class ogroup 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);
       }
     }
@@ -505,7 +505,7 @@ class ogroup extends plugin
 
         /* It has failed, add entry with type flag I (Invalid)*/
         if ($ldap->error != "success"){
-          $this->memberList[$dn]= array('text' => _("Non existing dn: ")."$dn","type" => "I");
+          $this->memberList[$dn]= array('text' => _("Non existing dn:")." ".@LDAP::fix($dn),"type" => "I");
 
         } else {
           
@@ -629,7 +629,8 @@ class ogroup extends plugin
 
   function check()
   {
-    $message= array();
+    /* Call common method to give check the hook */
+    $message= plugin::check();
 
     /* Permissions for that base? */
     if ($this->base != ""){
@@ -641,7 +642,7 @@ class ogroup extends plugin
 
     $ldap = $this->config->get_ldap_link();
     if($this->dn != $new_dn){
-      $ldap->cat ($new_dn);
+      $ldap->cat ($new_dn, array('dn'));
     }
     
     if($ldap->count() !=0){
@@ -689,7 +690,7 @@ class ogroup 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->member)){
@@ -711,7 +712,7 @@ class ogroup extends plugin
     $this->handle_post_events($mode);
 
     $ret= 0;
-    if (show_ldap_error($ldap->get_error())){
+    if (show_ldap_error($ldap->get_error(), _("Saving object group failed"))){
       $ret= 1;
     }
 
@@ -724,7 +725,7 @@ class ogroup extends plugin
 
     $ldap= $this->config->get_ldap_link();
     $ldap->rmdir($this->dn);
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Removing object group failed"));
 
     /* Trigger remove signal */
     $this->handle_post_events("remove");