From ec9d789c7353c11b5f6bee008c4f4280fa2c56b3 Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 13 Feb 2021 19:05:08 +0200 Subject: files are actually deleted now from abstract filesystem and from the real filesystem --- php/.configuration.php.swp | Bin 0 -> 12288 bytes php/database.php | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 php/.configuration.php.swp (limited to 'php') diff --git a/php/.configuration.php.swp b/php/.configuration.php.swp new file mode 100644 index 0000000..56c6cfb Binary files /dev/null and b/php/.configuration.php.swp differ diff --git a/php/database.php b/php/database.php index 4b701a2..c7851c5 100644 --- a/php/database.php +++ b/php/database.php @@ -310,7 +310,7 @@ require_once "node.php"; return; } } - unlink($storage_root,"/".$location); + unlink($storage_root."/".$location); if($location==NULL) { @@ -378,6 +378,7 @@ require_once "node.php"; function unlink_nodes(int $dir_id, string $filename) { + global $storage_root; /*TODO delet this*/ error_log("in unlink nodes"); $prep=$this->pdo->prepare("delete from node_links @@ -419,7 +420,8 @@ require_once "node.php"; $res=$prep->fetchAll(PDO::FETCH_ASSOC); foreach($res as $node) { - unlink($storage_root,"/".$node["code"]); + unlink($storage_root."/".$node["code"]); + error_log("deleting: ".$storage_root."/".$node["code"]); } $prep=$this->pdo->prepare("delete from nodes where node_id in (select node_id from super_trash)"); -- cgit v1.2.3