X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_MultiSelectWindow.inc;h=c1faef3600058bae7d03ef429d015b294b214662;hb=b4d64161d920fb20e0337ab76793ec973e52d297;hp=82aac59eee198e016f7bdae4c8acf11ecfb2b04b;hpb=7859b8b3047467324f9b3c30c6ffc1215dc513c9;p=gosa.git diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc index 82aac59ee..c1faef360 100644 --- a/include/class_MultiSelectWindow.inc +++ b/include/class_MultiSelectWindow.inc @@ -34,6 +34,7 @@ class MultiSelectWindow{ var $HideFilterPart = false; var $SaveAdditionalVars = array(); // Additional Post vars to store + var $module= ""; function ClearElementsList() { @@ -72,9 +73,10 @@ class MultiSelectWindow{ } /* Contrucktion */ - function MultiSelectWindow($config,$filterName) + function MultiSelectWindow($config, $filterName, $module) { $this->config = $config; + $this->module = $module; $this->SaveButtonString = _("Save"); $this->CloseButtonString = _("Close"); $this->filterName = $filterName; @@ -273,7 +275,7 @@ class MultiSelectWindow{ if($box['default'] == true){ $boxes .=" ".$box['string']."
"; }else{ - $boxes .=" ".$box['string']."
"; + $boxes .=" ".$box['string']."
"; } } $smarty->assign("CheckBoxes", $boxes); @@ -360,6 +362,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 =""; @@ -486,7 +493,7 @@ class MultiSelectWindow{ /* Create header snapshot value */ function get_snapshot_header() { - $str = ""; + $str = " "; if($this->parent->snapshotEnabled()){ $ok = false; foreach($this->parent->get_used_snapshot_bases() as $base){ @@ -508,19 +515,20 @@ class MultiSelectWindow{ function GetSnapShotActions($dn) { - $str = ""; + $str= ""; if($this->parent->snapshotEnabled()){ - $str .=" "; - if(count($this->parent->Available_SnapsShots($dn))){ - $str .=" "; - }else{ - $str.= " "; + } else { + $str = " "; } + + $str.= " "; } + return($str); } @@ -546,8 +554,8 @@ class MultiSelectWindow{ $this->departments = array(); /* Get all departments within this subtree */ - $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->ui->subtreeACL, - $base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT); + $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + array("ou", "description"), GL_SIZELIMIT | GL_CONVERT); /* Edit delete link for system types */