Changeset 3377
- Timestamp:
- 12/29/2005 01:46:32 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-post.php
r3376 r3377 905 905 $number = ''; 906 906 $filename = $name; 907 while ( file_exists($upload['path'] . "/$filename") ) 908 $filename = str_replace("$number.$ext", ++$number . ".$ext", $filename); 909 907 $path_parts = pathinfo($filename); 908 $ext = $path_parts['extension']; 909 if ( empty($ext) ) 910 $ext = ''; 911 else 912 $ext = ".$ext"; 913 while ( file_exists($upload['path'] . "/$filename") ) { 914 if ( '' == "$number$ext" ) 915 $filename = $filename . ++$number . $ext; 916 else 917 $filename = str_replace("$number$ext", ++$number . $ext, $filename); 918 } 919 910 920 $new_file = $upload['path'] . "/$filename"; 911 921 $ifp = @ fopen($new_file, 'wb');
Note: See TracChangeset
for help on using the changeset viewer.