|
@@ 911-912 (lines=2) @@
|
| 908 |
|
if ($modSettings['postmod_active'] && !$row['approved'] && !in_array(0, $boards_can['approve_posts']) && !in_array($row['id_board'], $boards_can['approve_posts'])) |
| 909 |
|
unset($_REQUEST['actions'][$row['id_topic']]); |
| 910 |
|
// Goodness, this is fun. We need to validate the action. |
| 911 |
|
elseif ($_REQUEST['actions'][$row['id_topic']] == 'sticky' && !in_array(0, $boards_can['make_sticky']) && !in_array($row['id_board'], $boards_can['make_sticky'])) |
| 912 |
|
unset($_REQUEST['actions'][$row['id_topic']]); |
| 913 |
|
elseif ($_REQUEST['actions'][$row['id_topic']] == 'move' && !in_array(0, $boards_can['move_any']) && !in_array($row['id_board'], $boards_can['move_any']) && ($row['id_member_started'] != $user_info['id'] || (!in_array(0, $boards_can['move_own']) && !in_array($row['id_board'], $boards_can['move_own'])))) |
| 914 |
|
unset($_REQUEST['actions'][$row['id_topic']]); |
| 915 |
|
elseif ($_REQUEST['actions'][$row['id_topic']] == 'remove' && !in_array(0, $boards_can['remove_any']) && !in_array($row['id_board'], $boards_can['remove_any']) && ($row['id_member_started'] != $user_info['id'] || (!in_array(0, $boards_can['remove_own']) && !in_array($row['id_board'], $boards_can['remove_own'])))) |
|
@@ 921-922 (lines=2) @@
|
| 918 |
|
elseif ($_REQUEST['actions'][$row['id_topic']] == 'lock' && !in_array(0, $boards_can['lock_any']) && !in_array($row['id_board'], $boards_can['lock_any']) && ($row['id_member_started'] != $user_info['id'] || $row['locked'] == 1 || (!in_array(0, $boards_can['lock_own']) && !in_array($row['id_board'], $boards_can['lock_own'])))) |
| 919 |
|
unset($_REQUEST['actions'][$row['id_topic']]); |
| 920 |
|
// If the topic is approved then you need permission to approve the posts within. |
| 921 |
|
elseif ($_REQUEST['actions'][$row['id_topic']] == 'approve' && (!$row['unapproved_posts'] || (!in_array(0, $boards_can['approve_posts']) && !in_array($row['id_board'], $boards_can['approve_posts'])))) |
| 922 |
|
unset($_REQUEST['actions'][$row['id_topic']]); |
| 923 |
|
} |
| 924 |
|
} |
| 925 |
|
$smcFunc['db_free_result']($request); |