From caa6a7afee2da0d62cd31ef76506d0f37e259f4d Mon Sep 17 00:00:00 2001 From: moehm Date: Wed, 26 Mar 2014 08:06:47 +0100 Subject: Various improvements, e.g. move_folder() and a new database layout. --- www/functions/func_download.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'www/functions/func_download.php') diff --git a/www/functions/func_download.php b/www/functions/func_download.php index e3e36aa..2239c71 100644 --- a/www/functions/func_download.php +++ b/www/functions/func_download.php @@ -66,7 +66,7 @@ function check_file_hash($db, $file_id, $download_hash){ return DOWNLOAD_FALSE_ID; } - $check_hash_db = $db->query("SELECT folder, share FROM files WHERE id=" . SQLite3::escapeString($file_id).";"); + $check_hash_db = $db->query("SELECT folder, share, download_link FROM files WHERE id=" . SQLite3::escapeString($file_id).";"); $check_hash_ar = $check_hash_db->fetchArray(SQLITE3_NUM); if($check_hash_ar[0] != "FILE"){ @@ -74,7 +74,7 @@ function check_file_hash($db, $file_id, $download_hash){ } if($check_hash_ar[1] != "PUBLIC"){ - if($check_hash_ar[0] != $download_hash){ + if($check_hash_ar[2] != $download_hash){ return DOWNLOAD_PRIVATE_FILE; } } -- cgit v1.2.3