summaryrefslogtreecommitdiffstats
path: root/wp-includes/functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-22 14:24:41 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-02-22 14:24:41 +0000
commit5fd2feb54c38fc6f357026aadd8abfd224631c26 (patch)
treee656773b126e32d85ba8d9578a6e7e5fff90652a /wp-includes/functions.php
parentc463abff16013fb7b011758a314d444278212894 (diff)
downloadwordpress-mu-5fd2feb54c38fc6f357026aadd8abfd224631c26.tar.gz
wordpress-mu-5fd2feb54c38fc6f357026aadd8abfd224631c26.tar.xz
wordpress-mu-5fd2feb54c38fc6f357026aadd8abfd224631c26.zip
WP Merge to 4914
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@896 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/functions.php')
-rw-r--r--wp-includes/functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 0a43602..aaaefc1 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -1113,7 +1113,7 @@ function wp_upload_dir() {
return apply_filters('upload_dir', $uploads);
}
-function wp_upload_bits($name, $type, $bits) {
+function wp_upload_bits($name, $type, $bits, $overwrite = false) {
if ( empty($name) )
return array('error' => __("Empty filename"));
@@ -1134,7 +1134,7 @@ function wp_upload_bits($name, $type, $bits) {
$ext = '';
else
$ext = ".$ext";
- while ( file_exists($upload['path'] . "/$filename") ) {
+ while ( file_exists($upload['path'] . "/$filename") && !$overwrite ) {
if ( '' == "$number$ext" )
$filename = $filename . ++$number . $ext;
else