X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=setup%2Fclass_setupStep_Ldap.inc;h=6c4a1ab9e36eac31f5036e3bb7af395ad27b1a21;hb=9c711551eae81c5c9914fb785b00869b31c70f83;hp=3e3bc899a12e63b904c61afa50d668445665974d;hpb=bf462dc5c237b48cdad12a5393ec2afe8e519902;p=gosa.git
diff --git a/setup/class_setupStep_Ldap.inc b/setup/class_setupStep_Ldap.inc
index 3e3bc899a..6c4a1ab9e 100644
--- a/setup/class_setupStep_Ldap.inc
+++ b/setup/class_setupStep_Ldap.inc
@@ -20,7 +20,7 @@
*/
-class setup_step_4 extends setup_step
+class Step_Ldap extends setup_step
{
var $connection = "ldap://localhost:389";
var $location = "default";
@@ -35,20 +35,25 @@ class setup_step_4 extends setup_step
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 setup_step_4()
+ function Step_Ldap()
{
$this->update_strings();
+
+
+
}
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.");
}
@@ -77,7 +82,7 @@ class setup_step_4 extends setup_step
$smarty->assign("resolved_users_count",count($tmp));
$smarty->assign("resolve_filter",$this->resolve_filter);
}
- return($smarty -> fetch (get_template_path("../setup/setup_step4.tpl")));
+ return($smarty -> fetch (get_template_path("../setup/setup_ldap.tpl")));
}
function get_connection_status()
@@ -99,10 +104,10 @@ class setup_step_4 extends setup_step
return("".$str."");
}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("".$str."");
}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("".$str."");
}
}
@@ -117,7 +122,7 @@ class setup_step_4 extends setup_step
$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);
@@ -132,10 +137,16 @@ class setup_step_4 extends setup_step
}
}
+ 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'];
}
@@ -143,7 +154,7 @@ class setup_step_4 extends setup_step
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;
}
}