From 96086607b02db34f0d31daa2e30b3dce64240c02 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 13 Apr 2010 10:33:33 +0000 Subject: [PATCH] Updated snapshot restore git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17607 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_SnapShotDialog.inc | 8 ++++++-- gosa-core/include/class_management.inc | 2 +- gosa-core/include/class_plugin.inc | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/class_SnapShotDialog.inc b/gosa-core/include/class_SnapShotDialog.inc index 69bef2128..894e87d66 100644 --- a/gosa-core/include/class_SnapShotDialog.inc +++ b/gosa-core/include/class_SnapShotDialog.inc @@ -78,7 +78,7 @@ class SnapShotDialog extends plugin if((preg_match("/^RemoveSnapShot_/",$name)) && ($once)){ $once = false; $entry = preg_replace("/^RemoveSnapShot_/","",$name); - $entry = base64_decode(preg_replace("/_[xy]$/","",$entry)); + $entry = base64_decode($entry); $found = false; foreach($this->last_list as $t_stamp => $obj){ if($obj['dn'] == $entry){ @@ -147,7 +147,11 @@ class SnapShotDialog extends plugin $time_stamp = date(_("Y-m-d, H:i:s"),preg_replace("/\-.*$/","",$entry['gosaSnapshotTimestamp'][0])); $display_data = $entry['description'][0]; $data[$entry['dn']] = $entry; - $lData[$entry['dn']] = array('data'=>array($time_stamp,htmlentities (utf8_decode(LDAP::fix($display_data))),str_replace("%KEY",base64_encode($entry['dn']),$actions))); + $lData[$entry['dn']] = array('data'=> + array( + $time_stamp, + htmlentities(utf8_decode(LDAP::fix($display_data))), + str_replace("%KEY",base64_encode($entry['dn']), $actions))); } $this->snapList->setListData($data, $lData); diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 0015aa90f..af5c4c016 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -416,7 +416,7 @@ class management $once =TRUE; if(preg_match("/^RestoreSnapShot_/",$name) && $once){ $once = FALSE; - $entry = base64_decode(preg_replace("/^RestoreSnapShot_([^_]*)_[xy]$/i","\\1",$name)); + $entry = base64_decode(preg_replace("/^RestoreSnapShot_(.*)$/i","\\1",$name)); $action['action'] = "restoreSnapshot"; $action['targets'] = array($entry); } diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 20cb44568..5af565229 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -1465,7 +1465,7 @@ class plugin /* Restore selected snapshot */ if(preg_match("/^RestoreSnapShot_/",$name) && $once){ $once = false; - $entry = base64_decode(preg_replace("/^RestoreSnapShot_([^_]*)_[xy]$/i","\\1",$name)); + $entry = base64_decode(preg_replace("/^RestoreSnapShot_(.*)$/i","\\1",$name)); if(!empty($entry) && $ui->allow_snapshot_restore($this->dn,$this->parent->acl_module)){ $this->restore_snapshot($entry); -- 2.30.2