aboutsummaryrefslogtreecommitdiffstats
path: root/packages/autoconfigbackup/autoconfigbackup.php
diff options
context:
space:
mode:
Diffstat (limited to 'packages/autoconfigbackup/autoconfigbackup.php')
-rw-r--r--packages/autoconfigbackup/autoconfigbackup.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php
index f3966fa4..43388bbe 100644
--- a/packages/autoconfigbackup/autoconfigbackup.php
+++ b/packages/autoconfigbackup/autoconfigbackup.php
@@ -158,6 +158,22 @@ EOF;
//unlink("/tmp/config_restore.xml");
}
+if($_REQUEST['rmver'] != "") {
+ $curl_session = curl_init();
+ curl_setopt($curl_session, CURLOPT_URL, $del_url);
+ curl_setopt($curl_session, CURLOPT_POST, 3);
+ curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($curl_session, CURLOPT_POSTFIELDS, "action=delete" .
+ "&hostname=" . urlencode($hostname) .
+ "&revision=" . urlencode($_REQUEST['rmver']));
+ $data = curl_exec($curl_session);
+ if (curl_errno($curl_session)) {
+ } else {
+ curl_close($curl_session);
+ }
+}
+
// Populate available backups
$curl_session = curl_init();
curl_setopt($curl_session, CURLOPT_URL, $get_url);
@@ -176,22 +192,6 @@ if (curl_errno($curl_session)) {
curl_close($curl_session);
}
-if($_REQUEST['rmver'] != "") {
- $curl_session = curl_init();
- curl_setopt($curl_session, CURLOPT_URL, $del_url);
- curl_setopt($curl_session, CURLOPT_POST, 3);
- curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl_session, CURLOPT_POSTFIELDS, "action=delete" .
- "&hostname=" . urlencode($hostname) .
- "&revision=" . urlencode($_REQUEST['rmver']));
- $data = curl_exec($curl_session);
- if (curl_errno($curl_session)) {
- } else {
- curl_close($curl_session);
- }
-}
-
// Loop through and create new confvers
$data_split = split("\n", $data);
$confvers = array();