diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-08 21:35:30 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-08 21:35:30 +0100 |
commit | d4858527c2fae4b58c5a9bc1c3aae9ada0ee7b24 (patch) | |
tree | ac8f68b3e57c6844aeba3d5dbcca72e55ae8f00f /apps/files/ajax/rename.php | |
parent | fedff3eafe73a3eafbc1bc7af364297e8135d086 (diff) | |
download | nextcloud-server-d4858527c2fae4b58c5a9bc1c3aae9ada0ee7b24.tar.gz nextcloud-server-d4858527c2fae4b58c5a9bc1c3aae9ada0ee7b24.zip |
fix rename parameter order
Diffstat (limited to 'apps/files/ajax/rename.php')
-rw-r--r-- | apps/files/ajax/rename.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php index a2b9b8de257..470ee635a2a 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -11,9 +11,9 @@ $dir = stripslashes($_GET["dir"]); $file = stripslashes($_GET["file"]); $newname = stripslashes($_GET["newname"]); -if (OC_User::isLoggedIn() && ($dir != '' || $file != 'Shared')) { - $targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file); - $sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $newname); +if (($dir != '' || $file != 'Shared')) { + $targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $newname); + $sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file); if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) { OCP\JSON::success(array("data" => array( "dir" => $dir, "file" => $file, "newname" => $newname ))); } else { |