diff options
author | admin <devnull@localhost> | 2006-10-01 21:20:42 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-01 21:20:42 +0200 |
commit | 33dd95d7cb8ac2f6b8da447966a750bdb064fc48 (patch) | |
tree | 597f802bcc31629d0f6cf197d8a73cb4e99e04ca /system | |
parent | 70d553b847ad86b8f1cf2a93f322a3c918b03ba0 (diff) |
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Zip.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 2ffed9fe2..a11699956 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -261,8 +261,13 @@ class CI_Zip { * @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'); |