git-svn-id: http://svn.automattic.com/wordpress/trunk@2170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-01-31 10:24:05 +00:00
parent eeee21f816
commit 85c19d30c2

View File

@ -105,8 +105,8 @@ case 'upload':
$tmppathtofile = $pathtofile2; $tmppathtofile = $pathtofile2;
$img2_name = $img1_name; $img2_name = $img1_name;
while (file_exists($pathtofile2)) { while ( file_exists($pathtofile2) ) {
$pos = strpos($tmppathtofile, '.'.trim($imgtype)); $pos = strpos( strtolower($tmppathtofile), '.' . trim($imgtype) );
$pathtofile_start = substr($tmppathtofile, 0, $pos); $pathtofile_start = substr($tmppathtofile, 0, $pos);
$pathtofile2 = $pathtofile_start.'_'.zeroise($i++, 2).'.'.trim($imgtype); $pathtofile2 = $pathtofile_start.'_'.zeroise($i++, 2).'.'.trim($imgtype);
$img2_name = explode('/', $pathtofile2); $img2_name = explode('/', $pathtofile2);