index b961cf339073737b8d5bbc542dd4c31fc2ca793e..2e2faa8bc535f5355d0336a02df43056b1d3e737 100644 (file)
}
register_global("ogfilter", $ogfilter);
- if(isset($_SESSION['ogroupfilter']['depselect'])){
- $this->base = $_SESSION['ogroupfilter']['depselect'];
+ if(isset($_SESSION['CurrentMainBase'])){
+ $this->base = $_SESSION['CurrentMainBase'];
}
/* set permissions */
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);
}
}
/* 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 {
function check()
{
- $message= array();
+ /* Call common method to give check the hook */
+ $message= plugin::check();
/* Permissions for that base? */
if ($this->base != ""){
$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){
/* 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)){
$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;
}
$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");