X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fclass_MultiSelectWindow.inc;h=9dd83864c87abca7542ae2ccb0f2686a501b7a49;hb=46ccf08f0aaa3f7d779af1d6e223b301f25efbb8;hp=f201660a64c7d8f98059b6bd2bec98d8d9f7760f;hpb=5d6d08f1480ac389e3d91ee54899420b174c06e5;p=gosa.git
diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc
index f201660a6..9dd83864c 100644
--- a/include/class_MultiSelectWindow.inc
+++ b/include/class_MultiSelectWindow.inc
@@ -35,8 +35,6 @@ class MultiSelectWindow{
var $SaveAdditionalVars = array(); // Additional Post vars to store
- var $force_height = false;
-
function ClearElementsList()
{
$this->array_Elements = array();
@@ -47,18 +45,11 @@ class MultiSelectWindow{
$this->HideFilterPart = $bool;
}
- function ForceMaximumDivHeight($height = "")
- {
- $this->DivHeight = $height;
- if(!empty($height)){
- $this->force_height = true;
- }else{
- $this->force_height = false;
- }
+ function SetHeight($height)
+ {
+ $this->DivHeight=$height;
}
-
-
/* Adds a regex input field to the current dialog */
function AddRegex($name,$string,$value,$conn,$image="images/search.png")
{
@@ -88,12 +79,6 @@ class MultiSelectWindow{
$this->CloseButtonString = _("Close");
$this->filterName = $filterName;
- /* Set default base, to users base */
- $ui = get_userinfo();
- $base = get_base_from_people($ui->dn);
- if(!isset($_SESSION['CurrentMainBase'])){
- $_SESSION['CurrentMainBase'] = $base;
- }
$this->selectedBase = $_SESSION['CurrentMainBase'];
/* Check default values for SaveAdditionalVars */
@@ -356,8 +341,6 @@ class MultiSelectWindow{
$smarty->assign("filterName" , $this->filterName);
$smarty->assign("is_headpage" , $this->is_headpage);
- $smarty->assign("force_height",$this->force_height);
-
$display = $smarty->fetch(get_template_path("MultiSelectWindow.tpl"));
return($display);
}
@@ -377,6 +360,11 @@ class MultiSelectWindow{
Store data also into a session var, to keep the checkboxes check after reload */
function save_object()
{
+ /* Get up to date config */
+ if(isset($this->parent->config)){
+ $this->config = $this->parent->config;
+ }
+
/* Update current base */
if($this->DepartmentsAdded){
$s_action ="";
@@ -493,12 +481,56 @@ class MultiSelectWindow{
$val = preg_replace("/\*\**/","*",$val);
$this->array_Regexes[$key]['value'] = $val;
$this->$box['name'] = $val;
+ $_SESSION['MultiDialogFilters'][$this->filterName][$box['name']] = $val;
}
}
}
-
}
+
+ /* Create header snapshot value */
+ function get_snapshot_header()
+ {
+ $str = " ";
+ if($this->parent->snapshotEnabled()){
+ $ok = false;
+ foreach($this->parent->get_used_snapshot_bases() as $base){
+ $ok |= count($this->parent->getAllDeletedSnapshots($base)) >= 1 ;
+ }
+ if($ok){
+ $str = " ";
+ }else{
+ $str = " ";
+ }
+
+ $str .= " ";
+ }
+ return($str);
+ }
+
+
+ function GetSnapShotActions($dn)
+ {
+ $str= "";
+ if($this->parent->snapshotEnabled()){
+
+ if(count($this->parent->Available_SnapsShots($dn))){
+ $str.= " ";
+ } else {
+ $str = " ";
+ }
+
+ $str.= " ";
+ }
+
+ return($str);
+ }
+
+
/* this function adds the sub-departments of the current tree to the list */
function AddDepartments($base = false,$numtabs = 3)
{