X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_SnapShotDialog.inc;h=50b3ae29bd56c3acf0daa8421f6e0ed03e43f3bd;hb=06cc53394cf695b3bc663073e526d7d94e4bb2d6;hp=00e1f870d53a952be0c7e13b33dd28575c79aabf;hpb=41f011680aa03b862385ef9f9b61e0cc364a8129;p=gosa.git diff --git a/gosa-core/include/class_SnapShotDialog.inc b/gosa-core/include/class_SnapShotDialog.inc index 00e1f870d..50b3ae29b 100644 --- a/gosa-core/include/class_SnapShotDialog.inc +++ b/gosa-core/include/class_SnapShotDialog.inc @@ -1,4 +1,24 @@ 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){ @@ -73,6 +100,7 @@ class SnapShotDialog extends plugin } /* We must restore a snapshot */ + if($this->display_restore_dialog){ /* Should we only display all snapshots of already deleted objects @@ -98,8 +126,10 @@ class SnapShotDialog extends plugin /* 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 */ @@ -109,10 +139,10 @@ class SnapShotDialog extends plugin $this->last_list = $list_of_elements; foreach($list_of_elements as $entry){ - $actions= " "; - $actions.= " "; + $actions= " "; + $actions.= " "; $time_stamp = date(_("Y-m-d, H:i:s"),preg_replace("/\-.*$/","",$entry['gosaSnapshotTimestamp'][0])); $display_data = $entry['description'][0]; @@ -146,7 +176,7 @@ class SnapShotDialog extends plugin $message = plugin::check(); if(!$this->display_restore_dialog){ if(empty($this->CurrentDescription)){ - $message[] = _("Please specify a valid description for this snapshot."); + $message[]= msgPool::invalid(_("Description")); } } return($message);