From 778085118cd639a668e704a62d4b9970aaf2c8b8 Mon Sep 17 00:00:00 2001 From: nokonoko Date: Sat, 15 May 2021 14:58:31 +0200 Subject: [PATCH] remove function This is currently only used on Uguu.se, will be adding instructions for this at another time meanwhile this can't be enabled... oopsies --- static/php/upload.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/static/php/upload.php b/static/php/upload.php index 02c83e6..6bde4be 100644 --- a/static/php/upload.php +++ b/static/php/upload.php @@ -76,15 +76,15 @@ function generateName($file) } // Check blacklist DB - $q = $db->prepare('SELECT hash, COUNT(*) AS count FROM blacklistedfiles WHERE hash = (:hash)'); - $q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR); - $q->execute(); - $result = $q->fetch(); - if ($result['count'] > 0) { - http_response_code(415); - throw new UploadException(UPLOAD_ERR_BLACKLISTED); - exit(0); - } + //$q = $db->prepare('SELECT hash, COUNT(*) AS count FROM blacklistedfiles WHERE hash = (:hash)'); + //$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR); + //$q->execute(); + //$result = $q->fetch(); + //if ($result['count'] > 0) { + // http_response_code(415); + // throw new UploadException(UPLOAD_ERR_BLACKLISTED); + // exit(0); + //} // Check if a file with the same name does already exist in the database $q = $db->prepare('SELECT COUNT(filename) FROM files WHERE filename = (:name)');