aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradam <adam@>2021-02-13 19:05:08 +0200
committeradam <adam@>2021-02-13 19:05:08 +0200
commitec9d789c7353c11b5f6bee008c4f4280fa2c56b3 (patch)
tree383c326f15fa4eeb73402b497b19cad236ef9d94
parent32385bfd16fd588e13f5bdebae1c08fd729c5815 (diff)
downloadfileup-ec9d789c7353c11b5f6bee008c4f4280fa2c56b3.tar.gz
files are actually deleted now from abstract filesystem and from the real filesystem
-rw-r--r--php/.configuration.php.swpbin0 -> 12288 bytes
-rw-r--r--php/database.php6
2 files changed, 4 insertions, 2 deletions
diff --git a/php/.configuration.php.swp b/php/.configuration.php.swp
new file mode 100644
index 0000000..56c6cfb
--- /dev/null
+++ b/php/.configuration.php.swp
Binary files 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)");