commit | 33dd95d7cb8ac2f6b8da447966a750bdb064fc48 | [log] [tgz] |
---|---|---|
author | admin <devnull@localhost> | Sun Oct 01 19:20:42 2006 +0000 |
committer | admin <devnull@localhost> | Sun Oct 01 19:20:42 2006 +0000 |
tree | 597f802bcc31629d0f6cf197d8a73cb4e99e04ca | |
parent | 70d553b847ad86b8f1cf2a93f322a3c918b03ba0 [diff] [blame] |
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 2ffed9f..a116999 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php
@@ -261,8 +261,13 @@ * @param string the data to be encoded * @return bool */ - function download($filename) + function download($filename = 'backup.zip') { + if ( ! preg_match("|.+?\.zip$|", $filename)) + { + $filename .= '.zip'; + } + if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { header('Content-Type: application/x-zip');