From: Joe Hunt Date: Tue, 19 May 2009 00:34:40 +0000 (+0000) Subject: html header shown in backup downloads. X-Git-Tag: 2.3-final~1257 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=3da6017fb53608aa027b2d036c1b0329045900c9;p=fa-stable.git html header shown in backup downloads. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1ac3b29d..2f2ddb38 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -20,6 +20,8 @@ Legend: $ -> Affected files 18-May-2009 Joe Hunt +# html header shown in backup downloads. +$ /admin/backups.php ! Reinserted the link to GL in Work Order Inquiry. $ /manufacturing/search_work_orders.php # Added non closed work order requirements on On Order in Inventory Items Status diff --git a/admin/backups.php b/admin/backups.php index cfc54c7f..f78e1d5a 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -16,6 +16,24 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/admin/db/maintenance_db.inc"); +if (get_post('view')) { + $filename = BACKUP_PATH . get_post('cmb_backups'); + if (in_ajax()) + $Ajax->popup( $filename ); + else { + header('Content-type: application/octet-stream'); + header('Content-Length: '.filesize($filename)); + header("Content-Disposition: inline; filename=$filename"); + readfile($filename); + exit(); + } +}; + +if (get_post('download')) { + download_file(BACKUP_PATH . get_post('cmb_backups')); + exit; +} + page(_("Backup and Restore Database"), false, false, '', ''); check_paths(); @@ -116,24 +134,6 @@ if (get_post('restore')) { display_notification(_("Restore backup completed.")); } -if (get_post('view')) { - $filename = BACKUP_PATH . get_post('cmb_backups'); - if (in_ajax()) - $Ajax->popup( $filename ); - else { - header('Content-type: application/octet-stream'); - header('Content-Length: '.filesize($filename)); - header("Content-Disposition: inline; filename=$filename"); - readfile($filename); - exit(); - } -}; - -if (get_post('download')) { - download_file(BACKUP_PATH . get_post('cmb_backups')); - exit; -} - if (get_post('delete')) { if (unlink(BACKUP_PATH . get_post('cmb_backups'))) { display_notification(_("File successfully deleted.")." "