From: hickert Date: Fri, 2 Nov 2007 07:34:31 +0000 (+0000) Subject: Fixed snapshot entry in layers menu X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7611ea4d178faa38d14658a83f8416fe9b21fa6c;p=gosa.git Fixed snapshot entry in layers menu git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7707 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc index e267b3ded..7c2be7aa5 100644 --- a/include/class_MultiSelectWindow.inc +++ b/include/class_MultiSelectWindow.inc @@ -589,7 +589,7 @@ class MultiSelectWindow{ /* Create header snapshot value */ - function get_snapshot_header() + function get_snapshot_header($layer_menu = FALSE) { $str = " "; if($this->parent->snapshotEnabled()){ @@ -598,13 +598,20 @@ class MultiSelectWindow{ $ok |= count($this->parent->getAllDeletedSnapshots($base)) >= 1 ; } if($ok){ - $str = " "; + if($layer_menu){ + $str = "..| "._("Restore")."|RestoreDeletedSnapShot|\n"; + }else{ + $str = " "; + } }else{ - $str = " "; + if($layer_menu){ + $str = "..| "._("Restore")."|RestoreDeletedSnapShot|\n"; + }else{ + $str = " "; + } } - # $str .= " "; } return($str); diff --git a/include/class_plugin.inc b/include/class_plugin.inc index 58cec70ee..bb4863c3e 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -1383,7 +1383,8 @@ class plugin } /* Restore one of the already deleted objects */ - if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){ + if(((isset($_POST['menu_action']) && $_POST['menu_action'] == "RestoreDeletedSnapShot") + || preg_match("/^RestoreDeletedSnapShot_/",$name)) && $once){ $once = false; $this->snapDialog = new SnapShotDialog($this->config,"",$this); $this->snapDialog->set_snapshot_bases($baseSuffixe); diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index e64d25ba3..92109423b 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -165,12 +165,6 @@ class divListSystem extends MultiSelectWindow /* Add default header */ $listhead = MultiSelectWindow::get_default_header(); - /* Add snapshot icons */ - if(preg_match("/(c.*w|w.*c)/",$all_module_acls)){ - $listhead .= $this->get_snapshot_header($this->selectedBase); - $add_sep = true; - } - /* Add base selection */ $listhead .= _("Base")."  ". " get_snapshot_header(TRUE); + } $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead);