From 5c4f408cada9b60ab1b65335879378c43cfdca21 Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 13 Feb 2021 22:25:06 +0200 Subject: text files are kinda shared --- php/share.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'php/share.php') diff --git a/php/share.php b/php/share.php index 28d00f8..c56f19e 100644 --- a/php/share.php +++ b/php/share.php @@ -45,7 +45,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST") exit(0); }else if($_SERVER["REQUEST_METHOD"]== "GET") { - $code=$_GET["code"]; + $code=$_GET["file"]; $file_id=$database->get_node_with_code($code); if($file_id==NULL) { @@ -63,8 +63,8 @@ if($_SERVER["REQUEST_METHOD"] == "POST") exit(1); }else { - header("Content-type: $node[type]"); - readfile("$storage_root/$node[code]"); + header("Content-type: $node->type"); + readfile("$storage_root/$node->code"); } } -- cgit v1.2.3