index 07b410d21d785b1a6b268f81436b0b64c89316de..9e42c81a6a733d5c27516016bcd87c1c0c0beee6 100755 (executable)
class SnapShotDialog extends plugin
{
var $config;
class SnapShotDialog extends plugin
{
var $config;
- var $attributes = array("CurrentDescription");
- var $CurrentDescription = "";
- var $parent = NULL;
- var $Restore = false; /* Defines the restore mode */
- var $DeletedOnes = false; /* Specifies which objects will be listed */
- var $dialog = true;
+ var $attributes = array("CurrentDescription");
+ var $CurrentDescription = "";
+ var $parent = NULL;
+ var $display_restore_dialog = false; /* Defines the restore mode */
+ var $display_all_removed_objects= false; /* Specifies which objects will be listed, all snapshots for a single entry
+ or all snapshots of already deleted objects */
+ var $dialog = true;
function SnapShotDialog($config,$dn,$parent)
{
function SnapShotDialog($config,$dn,$parent)
{
plugin::execute();
$smarty = get_smarty();
plugin::execute();
$smarty = get_smarty();
- /* We must restore a snapshot, so get snapshots */
- if($this->Restore){
+ /* We must restore a snapshot */
+ if($this->display_restore_dialog){
/* Should we only display all snapshots of already deleted objects
or the snapshots for the given object dn */
$res = array();
/* Should we only display all snapshots of already deleted objects
or the snapshots for the given object dn */
$res = array();
- if($this->DeletedOnes){
+ if($this->display_all_removed_objects){
if(is_array($this->dn)){
$tmp = array();
foreach($this->dn as $dn){
if(is_array($this->dn)){
$tmp = array();
foreach($this->dn as $dn){
$data = $entry['description'][0];
$date = date("d.m.Y H.i.s",preg_replace("/\-.*$/","",$entry['gosaSnapshotTimestamp'][0]));
$data = $entry['description'][0];
$date = date("d.m.Y H.i.s",preg_replace("/\-.*$/","",$entry['gosaSnapshotTimestamp'][0]));
- if($this->DeletedOnes){
+ if($this->display_all_removed_objects){
$data.= " - ".$entry['gosaSnapshotDN'][0];
}
$data.= " - ".$entry['gosaSnapshotDN'][0];
}
$smarty->assign("CountSnapShots",count($res));
}
$smarty->assign("CountSnapShots",count($res));
}
- $smarty->assign("RestoreMode",$this->Restore);
+ $smarty->assign("RestoreMode",$this->display_restore_dialog);
$smarty->assign("CurrentDate",date("d.m.Y H:i"));
$smarty->assign("CurrentDN",$this->dn);
$smarty->assign("CurrentDescription",$this->CurrentDescription);
$smarty->assign("CurrentDate",date("d.m.Y H:i"));
$smarty->assign("CurrentDN",$this->dn);
$smarty->assign("CurrentDescription",$this->CurrentDescription);
- return($smarty->fetch(get_template_path("snapshotdialog.tpl",TRUE)));
+ return($smarty->fetch(get_template_path("snapshotdialog.tpl")));
}
function check()
{
$message = plugin::check();
}
function check()
{
$message = plugin::check();
- if(!$this->Restore){
+ if(!$this->display_restore_dialog){
if(empty($this->CurrentDescription)){
$message[] = _("Please specify a valid description for this snapshot.");
}
if(empty($this->CurrentDescription)){
$message[] = _("Please specify a valid description for this snapshot.");
}