aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradam <adam@>2021-02-15 12:13:06 +0200
committeradam <adam@>2021-02-15 12:13:06 +0200
commitd597a9d399f89b51483274c80d771b44905d275f (patch)
tree417ed43050bef6b77aba81a35ab65287a2b13545
parente99acb8fb9cb61c96fba7cd464f0dc2f0ac89004 (diff)
downloadfileup-d597a9d399f89b51483274c80d771b44905d275f.tar.gz
rename and move are back to their original functionality
-rw-r--r--php/move.php4
-rw-r--r--php/rename.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/php/move.php b/php/move.php
index a663c5a..5b8df30 100644
--- a/php/move.php
+++ b/php/move.php
@@ -38,7 +38,7 @@ if (!$old_dir || !$new_dir || ($old_dir==$user->home_directory && ($old_filename
}
// Check if the filename is taken in the new dir
-$contents_of_new_dir = $database->get_links_of($new_dir);
+$contents_of_new_dir = $database->get_links_of($new_dir,$user->user_id);
foreach ($contents_of_new_dir as $c) {
if ($c['name'] == $new_filename) {
error_log("filename $new_filename taken in $new_folder");
@@ -49,7 +49,7 @@ foreach ($contents_of_new_dir as $c) {
// Get the file node
$file_node = null;
-$contents_of_old_dir = $database->get_links_of($old_dir);
+$contents_of_old_dir = $database->get_links_of($old_dir,$user->user_id);
foreach ($contents_of_old_dir as $c) {
if ($c['name'] == $old_filename) {
$file_node = $c['id'];
diff --git a/php/rename.php b/php/rename.php
index 3721c22..dac67a2 100644
--- a/php/rename.php
+++ b/php/rename.php
@@ -27,7 +27,7 @@ if (!$dir) {
}
// Check if the new filename is taken in the new dir
-$contents_of_dir = $database->get_links_of($dir);
+$contents_of_dir = $database->get_links_of($dir,$user->user_id);
foreach ($contents_of_dir as $c) {
if ($c['name'] == $new_filename) {
error_log("/php/rename.php failed - filename $filename taken in $new_folder");
@@ -38,7 +38,7 @@ foreach ($contents_of_dir as $c) {
// Get the file node
$file_node = null;
-$contents_of_old_dir = $database->get_links_of($dir);
+$contents_of_old_dir = $database->get_links_of($dir,$user->user_id);
foreach ($contents_of_old_dir as $c) {
if ($c['name'] == $old_filename) {
$file_node = $c['id'];