1
0
mirror of https://github.com/nokonoko/Uguu.git synced 2024-01-06 13:35:15 +00:00

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
This commit is contained in:
nokonoko 2021-05-15 14:58:31 +02:00
parent ef50e75212
commit 778085118c

View File

@ -76,15 +76,15 @@ function generateName($file)
} }
// Check blacklist DB // Check blacklist DB
$q = $db->prepare('SELECT hash, COUNT(*) AS count FROM blacklistedfiles WHERE hash = (:hash)'); //$q = $db->prepare('SELECT hash, COUNT(*) AS count FROM blacklistedfiles WHERE hash = (:hash)');
$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR); //$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR);
$q->execute(); //$q->execute();
$result = $q->fetch(); //$result = $q->fetch();
if ($result['count'] > 0) { //if ($result['count'] > 0) {
http_response_code(415); // http_response_code(415);
throw new UploadException(UPLOAD_ERR_BLACKLISTED); // throw new UploadException(UPLOAD_ERR_BLACKLISTED);
exit(0); // exit(0);
} //}
// Check if a file with the same name does already exist in the database // 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)'); $q = $db->prepare('SELECT COUNT(filename) FROM files WHERE filename = (:name)');