summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-27 11:18:26 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-27 11:18:26 +0200
commit1fcce9667fe8d1925a36549e22124411f5828230 (patch)
tree56e5cb2c50831a50b7c79ea216645846ea59e8ab /system/helpers
parentb8949fab60082e17f219fc89c6c8a85d3ff73f19 (diff)
parentced2c9ab41450cb632c042730604111ec2a24e1f (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-db-mssql
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/download_helper.php3
-rw-r--r--system/helpers/file_helper.php2
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);
}