diff --git a/gosa-core/include/class_SnapShotDialog.inc b/gosa-core/include/class_SnapShotDialog.inc
index bdaac544ff93e8c0b400c799c2fb62b3ec378ac4..50b3ae29bd56c3acf0daa8421f6e0ed03e43f3bd 100644 (file)
plugin::execute();
$smarty = get_smarty();
+ if(!isset($this->parent->acl_module) || !count($this->parent->acl_module)){
+ trigger_error("Could not detect acl_module in parent object (".get_class($this->parent).").");
+ return("");
+ }
+
+ $ui = get_userinfo();
+
$once = true;
foreach($_POST as $name => $value){
if((preg_match("/^RemoveSnapShot_/",$name)) && ($once)){
$once = false;
- $entry = preg_replace("/^RemoveSnapShot_/","",$name);
- $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
+ $entry = preg_replace("/^RemoveSnapShot_/","",$name);
+ $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
$found = false;
foreach($this->last_list as $t_stamp => $obj){
}
/* We must restore a snapshot */
+
if($this->display_restore_dialog){
/* Should we only display all snapshots of already deleted objects
/* Walk through all entries and setup the display text */
foreach($tmp as $key => $entry){
- $TimeStamp = $entry['gosaSnapshotTimestamp'][0];
- $list_of_elements[$TimeStamp] = $entry;
+
+ /* Check permissions */
+ $TimeStamp = $entry['gosaSnapshotTimestamp'][0];
+ $list_of_elements[$TimeStamp] = $entry;
}
/* Sort generated list */
$this->last_list = $list_of_elements;
foreach($list_of_elements as $entry){
- $actions= "<input type='image' src='images/restore.png' name='RestoreSnapShot_%KEY'
- class='center' title='"._("Restore snapshot")."'> ";
- $actions.= "<input type='image' src='images/edittrash.png' name='RemoveSnapShot_%KEY'
- class='center' title='"._("Remove snapshot")."'> ";
+ $actions= "<input type='image' src='images/lists/restore.png' name='RestoreSnapShot_%KEY'
+ class='center' title='"._("Restore snapshot")."'> ";
+ $actions.= "<input type='image' src='images/lists/trash.png' name='RemoveSnapShot_%KEY'
+ class='center' title='"._("Remove snapshot")."'> ";
$time_stamp = date(_("Y-m-d, H:i:s"),preg_replace("/\-.*$/","",$entry['gosaSnapshotTimestamp'][0]));
$display_data = $entry['description'][0];