index 3e3bc899a12e63b904c61afa50d668445665974d..6c4a1ab9e36eac31f5036e3bb7af395ad27b1a21 100644 (file)
*/
-class setup_step_4 extends setup_step
+class Step_Ldap extends setup_step
{
var $connection = "ldap://localhost:389";
var $location = "default";
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.");
}
$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()
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;
}
}