X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_MultiSelectWindow.inc;h=c1faef3600058bae7d03ef429d015b294b214662;hb=b4d64161d920fb20e0337ab76793ec973e52d297;hp=8481095f07e457aaf426bc5402a57d0a5ff075e6;hpb=9b4218828c153aea81c47788f443153f3b04192a;p=gosa.git
diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc
index 8481095f0..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 ="";
@@ -480,26 +487,48 @@ class MultiSelectWindow{
}
}
}
-
}
- function GetSnapShotActions($dn)
+ /* 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){
+ $ok |= count($this->parent->getAllDeletedSnapshots($base)) >= 1 ;
+ }
+ if($ok){
+ $str = " ";
+ }else{
+ $str = "
";
+ }
+
+ $str .= "
";
+ }
+ return($str);
+ }
- $str .=" ";
+
+ function GetSnapShotActions($dn)
+ {
+ $str= "";
+ if($this->parent->snapshotEnabled()){
if(count($this->parent->Available_SnapsShots($dn))){
- $str .=" ";
- }else{
- $str.= "
";
+ $str.= " ";
+ } else {
+ $str = "
";
}
+
+ $str.= " ";
}
+
return($str);
}
@@ -525,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
*/