summaryrefslogtreecommitdiff
path: root/www/functions/func_download.php
diff options
context:
space:
mode:
authormoehm2014-03-26 08:06:47 +0100
committermoehm2014-03-26 08:06:47 +0100
commitcaa6a7afee2da0d62cd31ef76506d0f37e259f4d (patch)
tree6877a822b1a2f272493d66948c3270ce58e11768 /www/functions/func_download.php
parente009b1e84dcbcc83f39652695eb86c6e64cc6a11 (diff)
downloadfiles.iamfabulous.de-caa6a7afee2da0d62cd31ef76506d0f37e259f4d.tar.gz
Various improvements, e.g. move_folder() and a new database layout.
Diffstat (limited to 'www/functions/func_download.php')
-rw-r--r--www/functions/func_download.php4
1 files changed, 2 insertions, 2 deletions
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;
}
}