forked from leftypol/leftypol
Merge pull request #93 from Macil/image_reject_repost_in_thread
Add image_reject_repost_in_thread option
This commit is contained in:
commit
accc3992f3
3 changed files with 46 additions and 12 deletions
|
@ -1651,6 +1651,20 @@ function getPostByHash($hash) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function getPostByHashInThread($hash, $thread) {
|
||||
global $board;
|
||||
$query = prepare(sprintf("SELECT `id`,`thread` FROM `posts_%s` WHERE `filehash` = :hash AND ( `thread` = :thread OR `id` = :thread )", $board['uri']));
|
||||
$query->bindValue(':hash', $hash, PDO::PARAM_STR);
|
||||
$query->bindValue(':thread', $thread, PDO::PARAM_INT);
|
||||
$query->execute() or error(db_error($query));
|
||||
|
||||
if ($post = $query->fetch()) {
|
||||
return $post;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function undoImage(array $post) {
|
||||
if (!$post['has_file'])
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue