aboutsummaryrefslogtreecommitdiffstats
path: root/php
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-02-13 19:59:34 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-02-13 19:59:34 +0200
commitdf1fcd07a15417173404b25b91cb8ac176e421c5 (patch)
treeea1774de3974b0fdb460787569d02259f405feb1 /php
parent0aaac404d75e61a17c5ff262f1e311c87647c82d (diff)
parentec9d789c7353c11b5f6bee008c4f4280fa2c56b3 (diff)
downloadfileup-df1fcd07a15417173404b25b91cb8ac176e421c5.tar.gz
Merge branch 'master' of https://github.com/alexvitkov/india
Diffstat (limited to 'php')
-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)");