diff options
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/download_helper.php | 3 | ||||
-rw-r--r-- | system/helpers/file_helper.php | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 19192a147..8b87f8179 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -100,6 +100,9 @@ if ( ! function_exists('force_download')) $x[count($x) - 1] = strtoupper($extension); $filename = implode('.', $x); } + + // Clean output buffer + ob_clean(); // Generate the server headers header('Content-Type: '.$mime); diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 3a373efd3..a5aabecd6 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -145,7 +145,7 @@ if ( ! function_exists('delete_files')) { delete_files($path.DIRECTORY_SEPARATOR.$filename, $del_dir, $level + 1, $htdocs); } - elseif ($htdocs === TRUE && ! preg_match('/^(\.htaccess|index\.(html|htm|php))$/', $filename)) + elseif ($htdocs === TRUE && ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename)) { @unlink($path.DIRECTORY_SEPARATOR.$filename); } |