index ff5b2a78803c97a2be5a2e126753f9d05c05fe89..c36f8ca79e90de405c11fc4193ee1044b5feb9d3 100644 (file)
var $resolve_user = FALSE;
var $tls = FALSE;
- var $attributes = array("connection","location","admin","password","base","tls");
+ var $rfc2307bis = FALSE;
+ var $attributes = array("connection","location","admin","password","base","tls","rfc2307bis");
+ var $header_image= "images/proxy.png";
function Step_Ldap()
{
function update_strings()
{
- $this->s_title = _("Ldap settings");
- $this->s_title_long = _("Ldap connection setup");
- $this->s_info = _("This dialog allows the basic configuration of GOsa's behaviour and properties in your main configuration.");
+ $this->s_title = _("LDAP setup");
+ $this->s_title_long = _("LDAP connection setup");
+ $this->s_info = _("This dialog performs the basic configuration of the LDAP connectivity for GOsa.");
}
return("<font color='red'>".$str."</font>");
}else{
if(empty($this->admin)){
- $str = sprintf(_("Anonymous bind successful on server '%s'. Please specify user and password."),$this->connection);
+ $str = sprintf(_("Anonymous bind on server '%s' succeeded. Please specify user and password."),$this->connection);
return("<font color='blue'>".$str."</font>");
}else{
- $str = sprintf(_("Bind as user '%s' successful on server '%s'."),$this->admin,$this->connection);
+ $str = sprintf(_("Bind as user '%s' on server '%s' succeeded."),$this->admin,$this->connection);
return("<font color='green'>".$str."</font>");
}
}
$ldap->search("(&(objectClass=person)(|(uid=".$filter.")(cn=".$filter.")))");
$tmp = array();
while($attrs = $ldap->fetch()){
- $tmp[$attrs['dn']]=$attrs['dn'];
+ $tmp[base64_encode($attrs['dn'])]= @LDAP::fix($attrs['dn']);
natcasesort($tmp);
}
return($tmp);
}
}
+ if(isset($_POST['resolve_user_x'])){
+ $this->resolve_user = !$this->resolve_user;
+ }
if(isset($_POST['resolve_user'])){
$this->resolve_user = !$this->resolve_user;
}
-
+
+ /* Hide backward forward button*/
+ $this->dialog = $this->resolve_user;
+
if(isset($_POST['resolve_filter'])){
$this->resolve_filter = $_POST['resolve_filter'];
}
if(isset($_POST['use_selected_user'])){
if(isset($_POST['admin_to_use'])){
- $this->admin = $_POST['admin_to_use'];
+ $this->admin = base64_decode($_POST['admin_to_use']);
$this->resolve_user = false;
}
}
$this->get_connection_status();
- if($this->bind_id){
+ if($this->bind_id && !empty($this->admin)){
$this->is_completed =TRUE;
}else{
$this->is_completed =FALSE;