index c982eec68a4db0de8366ba778339970fc7ff40a9..229941f77ed9648553b9a9e2ef68ecbb3d2c6322 100644 (file)
$smarty->assign("resolved_users_count",count($tmp));
$smarty->assign("resolve_filter",$this->resolve_filter);
}
+
+ $base_to_append = $this->base;
+ if(strlen($base_to_append) > 20){
+ $base_to_append = substr($base_to_append,0,17)."...";
+ }
+ $smarty->assign("base_to_append",$base_to_append);
return($smarty -> fetch (get_template_path("../setup/setup_ldap.tpl")));
}
function save_object()
{
+ $reset = FALSE;
foreach($this->attributes as $attr){
if(isset($_POST[$attr])){
-
if(in_array($attr,array("base","connection")) && $this->$attr != get_post($attr)){
- $this->parent->disable_steps_from($this->parent->step_name_to_id(get_class($this)));
+ $reset = TRUE;
}
$this->$attr = get_post($attr);
}
}
+ if($reset){
+ $this->parent->disable_steps_from(($this->parent->step_name_to_id(get_class($this))) +1);
+ $attr = @LDAP::get_naming_contexts($this->connection);
+ if(is_array($attr) && !in_array(get_post("base"),$attr)){
+ if(isset($attr[0])){
+ $this->base = $attr[0];
+ }
+ }
+ }
+
+
if(isset($_POST['resolve_user_x'])){
$this->resolve_user = !$this->resolve_user;
}