forked from leftypol/leftypol
Increased filehash
length and made the reject-post-if-image-already-exists-in-active-content thing
This commit is contained in:
parent
13ef38d7b7
commit
efa06c270e
4 changed files with 32 additions and 4 deletions
|
@ -1121,7 +1121,20 @@
|
|||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
function getPostByHash($hash) {
|
||||
global $board;
|
||||
$query = prepare(sprintf("SELECT `id`,`thread` FROM `posts_%s` WHERE `filehash` = :hash", $board['uri']));
|
||||
$query->bindValue(':hash', $hash, PDO::PARAM_STR);
|
||||
$query->execute() or error(db_error($query));
|
||||
|
||||
if($post = $query->fetch()) {
|
||||
return $post;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function undoImage($post) {
|
||||
unlink($post['file']);
|
||||
unlink($post['thumb']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue