Browse Source

Merge branch 'master' into css-config

pull/222/head
Tortle 1 year ago
parent
commit
254339643d
  1. 2
      imgboard.php
  2. 2
      inc/database/flatfile.php

2
imgboard.php

@ -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)) {

2
inc/database/flatfile.php

@ -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