forked from tslocum/tinyib
parent
f89556e482
commit
dd3b994a3c
2 changed files with 2 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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…
Reference in a new issue