Change 'Clear reports' to 'Approve' and make approval permanent
This commit is contained in:
parent
07b4e57ad3
commit
0851c4528a
|
@ -573,6 +573,10 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name'])
|
|||
fancyDie(__('Sorry, an invalid post identifier was sent. Please go back, refresh the page, and try again.'));
|
||||
}
|
||||
|
||||
if ($post['moderated'] == 1) {
|
||||
fancyDie(__('Moderators have determined that post does not break any rules.'));
|
||||
}
|
||||
|
||||
$report = reportByIP($post['id'], remoteAddress());
|
||||
if (!empty($report)) {
|
||||
fancyDie(__('You have already submitted a report for that post.'));
|
||||
|
@ -1028,10 +1032,11 @@ EOF;
|
|||
if ($_GET['clearreports'] > 0) {
|
||||
$post = postByID($_GET['clearreports']);
|
||||
if ($post) {
|
||||
approvePostByID($post['id']);
|
||||
deleteReportsByPost($post['id']);
|
||||
|
||||
manageLogAction(sprintf(__('Cleared reports for %s'), postLink('>>' . $post['id'])));
|
||||
$text .= manageInfo(__('Reports cleared.'));
|
||||
manageLogAction(__('Approved') . ' ' . postLink('>>' . $post['id']));
|
||||
$text .= manageInfo(sprintf(__('Post No.%d approved.'), $post['id']));
|
||||
} else {
|
||||
fancyDie(__("Sorry, there doesn't appear to be a post with that ID."));
|
||||
}
|
||||
|
|
|
@ -1226,7 +1226,7 @@ EOF;
|
|||
$report_html = '';
|
||||
$reports = reportsByPost($post['id']);
|
||||
if (TINYIB_REPORT && count($reports) > 0) {
|
||||
$txt_clear_reports = __('Clear reports');
|
||||
$txt_clear_reports = __('Approve');
|
||||
$report_info = count($reports) . ' ' . plural(count($reports), __('report'), __('reports'));
|
||||
$report_html = <<<EOF
|
||||
<tr><td align="right" width="50%;">
|
||||
|
@ -1314,7 +1314,7 @@ function manageEditKeyword($id) {
|
|||
<label for="action">$txt_action</label>
|
||||
<select name="action">
|
||||
EOF;
|
||||
if (TINYIB_REPORT) {
|
||||
if (TINYIB_REPORT && TINYIB_REQMOD != 'all') {
|
||||
$return .= '<option value="report"' . ($v_action == 'report' ? ' selected' : '') . '>' . __('Report') . '</option>';
|
||||
}
|
||||
$return .= '<option value="delete"' . ($v_action == 'delete' ? ' selected' : '') . '>' . __('Delete') . '</option>';
|
||||
|
|
Loading…
Reference in New Issue