Browse Source

Do not accept reports for approved posts

Relates to #219.
master
Trevor Slocum 2 weeks ago
parent
commit
dd3b994a3c
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      imgboard.php
  2. +1
    -1
      inc/database/flatfile.php

+ 1
- 1
imgboard.php View File

@ -1057,7 +1057,7 @@ EOF;
if ($_GET['approve'] > 0) {
$post = postByID($_GET['approve']);
if ($post) {
approvePostByID($post['id'], 1);
approvePostByID($post['id'], 2);
$thread_id = $post['parent'] == TINYIB_NEWTHREAD ? $post['id'] : $post['parent'];
if (strtolower($post['email']) != 'sage' && (TINYIB_MAXREPLIES == 0 || numRepliesToThreadByID($thread_id) <= TINYIB_MAXREPLIES)) {


+ 1
- 1
inc/database/flatfile.php View File

@ -263,7 +263,7 @@ function approvePostByID($id, $moderated) {
$rows = $GLOBALS['db']->selectWhere(POSTS_FILE, new SimpleWhereClause(POST_ID, '=', $id, INTEGER_COMPARISON), 1);
if (count($rows) > 0) {
foreach ($rows as $post) {
$post[POST_MODERATED] = $moderated;
$post[POST_MODERATED] = intval($moderated);
$GLOBALS['db']->updateRowById(POSTS_FILE, POST_ID, $post);
}
}


Loading…
Cancel
Save