- $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('backups')) {
+ display_error(_('Select backup file first.'));
+ } else {
+ $filename = BACKUP_PATH . get_post('backups');
+ if (in_ajax())
+ $Ajax->popup( $filename );
+ else {
+ header('Content-type: application/octet-stream');
+ header('Content-Length: '.filesize($filename));
+ header("Content-Disposition: inline");
+ readfile($filename);
+ exit();
+ }