News:

Wondering if this will always be free?  See why free is better.

Main Menu

Post Moderation in ./Sources/Post.php

Started by GL700Wing, November 06, 2024, 11:03:17 PM

Previous topic - Next topic

GL700Wing

The 'Approve this post' checkbox is displayed when editing a post even if post moderation is disabled and in this scenario unchecking the checkbox has no effect when the post is saved (ie, the post is not unapproved).

./Sources/Post.php
Line 767
Find:
// Leave the approval checkbox unchecked by default for unapproved messages.
if (!$row['approved'] && !empty($context['show_approval']))

Replace with:
// Leave the approval checkbox unchecked by default for unapproved messages.
if ($modSettings['postmod_active'] && !$row['approved'] && !empty($context['show_approval']))



The array name '$REQUEST' should be '$_REQUEST' (although it doesn't seem to make any difference to the outcome even when the array name is correct).

Line 2022
Find:
// Can they approve it?
$approve_checked = (!empty($REQUEST['approve']) ? 1 : 0);

Replace with:
// Can they approve it?
$approve_checked = (!empty($_REQUEST['approve']) ? 1 : 0);
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: