From ddb450fb10e7105841020a5b9878dd1ac855fdc8 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 8 Oct 2008 19:43:49 +0000 Subject: Hostname is required for restore operations --- packages/autoconfigbackup/autoconfigbackup.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/autoconfigbackup/autoconfigbackup.php') diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php index b75bf4d8..56578e2f 100644 --- a/packages/autoconfigbackup/autoconfigbackup.php +++ b/packages/autoconfigbackup/autoconfigbackup.php @@ -63,7 +63,9 @@ if(!$username) { if($_REQUEST['newver'] != "") { // Phone home and obtain backups $curl_session = curl_init(); - curl_setopt($curl_session, CURLOPT_URL, $get_url . "?action=restore&revision=" . urlencode($_REQUEST['newver'])); + curl_setopt($curl_session, CURLOPT_URL, $get_url . "?action=restore" . + "&hostname=" . urlencode($_REQUEST['newver']) . + " &revision=" . urlencode($_REQUEST['newver'])); curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($curl_session); @@ -75,7 +77,7 @@ if($_REQUEST['newver'] != "") { fclose($fd); if (curl_errno($curl_session)) { $fd = fopen("/tmp/backupdebug.txt", "w"); - fwrite($fd, $get_url . "" . "action=restore&revision=" . urlencode($_REQUEST['newver']) . "\n\n"); + fwrite($fd, $get_url . "" . "action=restore&hostname={$hostname}&revision=" . urlencode($_REQUEST['newver']) . "\n\n"); fwrite($fd, $data); fwrite($fd, curl_error($curl_session)); fclose($fd); -- cgit v1.2.3