diff --git a/gosa-core/include/class_MultiSelectWindow.inc b/gosa-core/include/class_MultiSelectWindow.inc
index 0e40eab1e5547b792fd3837dc82859d95d8cceb1..9c9bd5071763836acd638b6201d0f0a983b95fd5 100644 (file)
}
}
- /* Save base selection from headpage selectbox*/
+ /* Save base selection from headpage selectbox */
if(isset($_POST['CurrentMainBase'])){
- $this->selectedBase = $_POST['CurrentMainBase'];
+ $this->selectedBase = get_post('CurrentMainBase');
+ session::global_set("CurrentMainBase", $this->selectedBase);
+ } else {
+ $this->selectedBase= session::global_get("CurrentMainBase");
}
/* Homebutton is posted */
}
/* Save currenlty selected base in session */
- session::set("CurrentMainBase",$this->selectedBase);
+ session::global_set("CurrentMainBase",$this->selectedBase);
}
$this->DepartmentsAdded = true;
$this->Added_Departments = array();
$this->departments = array();
+
+ if(isset($this->Regex)){
+ $this->base_selection_regex = $this->Regex;
+ }
+
$linkopen = "<a href='?plug=".$_GET['plug']."&post_id=".$this->post_id."&act=dep_open&dep_id=%s'>%s</a>";
$types = departmentManagement::get_support_departments();
$ui = get_userinfo();
/* Get all departments within this subtree */
$s_filter = "";
$s_attrs = array("description","objectClass");
- $s_acls = array();
+ $s_acls = $this->module;
foreach($types as $name => $data){
$s_filter.= "(&(objectClass=gosaDepartment)(objectClass=".$data['OC'].")(".$data['ATTR']."=".$this->base_selection_regex."))";
$s_attrs[]= $data['ATTR'];
- $s_acls[] = "department/".$data['ACL'];
}
$tmp = get_list("(|".$s_filter.")",$s_acls,$this->selectedBase,$s_attrs,GL_NONE);
$first = $value;
}
+
+ $v_value = htmlentities($value,ENT_QUOTES);
if ($this->selectedBase == $value){
$found = TRUE;
- $options.= "<option selected='selected' value='".$value."'>$name</option>";
+ $options.= "<option selected='selected' value=\"".$v_value."\">$name</option>";
} else {
- $options.= "<option value='".$value."'>$name</option>";
+ $options.= "<option value=\"".$v_value."\">$name</option>";
}
}