diff -r 000000000000 -r d970ebf37754 wp/wp-content/plugins/wp-filemanager/incl/rename.inc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-content/plugins/wp-filemanager/incl/rename.inc.php Wed Nov 06 03:21:17 2013 +0000 @@ -0,0 +1,82 @@ +$StrFolderInvalidName"; + else if (@file_exists($home_directory.$wp_fileman_path.$new_directory_name)) + print "$StrAlreadyExists"; + else if (@rename($home_directory.$wp_fileman_path.$directory_name, $home_directory.$wp_fileman_path.$new_directory_name)) + print "$StrRenameFolderSuccess"; + else + { + print "$StrRenameFolderFail

"; + print $StrRenameFolderFailHelp; + } + } + + else if (isset($_GET['rename']) && isset($_POST['filename'])) + { + $filename = stripslashes($_POST['filename']); + if (!wp_fileman_is_valid_name($new_filename)) + print "$StrFileInvalidName"; + else if (@file_exists($home_directory.$wp_fileman_path.$new_filename)) + print "$StrAlreadyExists"; + else if (@rename($home_directory.$wp_fileman_path.$filename, $home_directory.$wp_fileman_path.$new_filename)) + print "$StrRenameFileSuccess"; + else + { + echo $home_directory.$wp_fileman_path.$filename; + //print rename($home_directory.$wp_fileman_path.$filename, $home_directory.$wp_fileman_path.$new_filename); + print "$StrRenameFileFail

"; + print $StrRenameFileFailHelp; + } + } + + else + { + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + if (isset($_GET['directory_name'])) print " $StrRenameFolder \"".htmlentities(basename($directory_name))."\""; + else if (isset($_GET['filename'])) print " $StrRenameFile \"".htmlentities(stripslashes($_GET['filename']))."\""; + print ""; + print "$StrBack"; + print "
"; + + print "

"; + + if (isset($_GET['directory_name'])) print "$StrRenameFolderQuestion

"; + else if (isset($_GET['filename'])) print "$StrRenameFileQuestion

"; + print "
"; + if (isset($_GET['directory_name'])) print " "; + else if (isset($_GET['filename'])) print " "; + print ""; + if (isset($_GET['directory_name'])) print ""; + else if (isset($_GET['filename'])) print ""; + print ""; + print "
"; + + print "

"; + + print "
"; + } +} +else + print "$StrAccessDenied"; + +?>