html header shown in backup downloads.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 19 May 2009 00:34:40 +0000 (00:34 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 19 May 2009 00:34:40 +0000 (00:34 +0000)
CHANGELOG.txt
admin/backups.php

index 1ac3b29dbbbd64434bcfab057d19f37cc738c419..2f2ddb38bb5e8bef7eaefd2f78c0221f2366ee3b 100644 (file)
@@ -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
index cfc54c7f27efdb3f5fad216413a35d9b169f18a3..f78e1d5a710eae40b83295c7531020f544c3589e 100644 (file)
@@ -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.")." "