aboutsummaryrefslogtreecommitdiffstats
path: root/php/node.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/node.php')
-rw-r--r--php/node.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/php/node.php b/php/node.php
index 0593211..dfe1297 100644
--- a/php/node.php
+++ b/php/node.php
@@ -74,6 +74,10 @@ require_once "user.php";
{
global $database;
$parent_dir_id=get_directory($abstract_path,$user);
+ if($parent_dir_id==$user->home_directory && ($filename=="share" || $filename=="trash"))
+ {
+ return ;
+ }
$database->unlink_nodes($parent_dir_id,$filename);
}
function create_share_link(string $abstract_path,string $filename,string $password,
@@ -93,7 +97,7 @@ require_once "user.php";
{
return NULL;
}
- $shared_node=$database->create_shared_node($password,$node_id);
+ $shared_node=$database->create_shared_node($password,$node_id,$users);
if($shared_node==NULL)
{
return NULL;