Permalink
Browse files

fix for moderation buttons in locked topics (MessageIndex)

  • Loading branch information...
1 parent 43fdf12 commit f93b4567a50d7f65062678cf7ba42b52b23865ae @silvercircle committed Mar 21, 2015
Showing with 6 additions and 4 deletions.
  1. +3 −3 Sources/MessageIndex.php
  2. +2 −0 Sources/SimpleSEF.php
  3. +1 −1 Themes/default/tpl/base.tpl
@@ -622,7 +622,7 @@ function MessageIndex()
// They can only mark read if they are logged in and it's enabled!
if (!$context['user']['is_logged'] || !$settings['show_mark_read'])
unset($context['normal_buttons']['markread']);
- HookAPI::callHook('messageindex_buttons', array(&$normal_buttons));
+ HookAPI::callHook('messageindex_buttons', array(&$context['normal_buttons']));
enqueueThemeScript('topic', 'scripts/topic.js', true);
HookAPI::callHook('messageindex', array(&$board_info));
@@ -631,7 +631,7 @@ function MessageIndex()
// Allows for moderation from the message index.
function QuickModeration()
{
- global $sourcedir, $board, $user_info, $modSettings, $sourcedir, $context;
+ global $board, $user_info, $modSettings, $sourcedir, $context;
// Check the session = get or post.
checkSession('request');
@@ -771,7 +771,7 @@ function QuickModeration()
unset($_REQUEST['actions'][$row['id_topic']]);
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']))))
unset($_REQUEST['actions'][$row['id_topic']]);
- 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'] || $locked == 1 || (!in_array(0, $boards_can['lock_own']) && !in_array($row['id_board'], $boards_can['lock_own']))))
+ 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']))))
unset($_REQUEST['actions'][$row['id_topic']]);
// If the topic is approved then you need permission to approve the posts within.
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']))))
@@ -1503,6 +1503,8 @@ private static function explode_csv($str) {
* Small helper function for benchmarking SimpleSEF. It's semi smart in the
* fact that you don't need to specify a 'start' or 'stop'... just pass the
* 'marker' twice and that starts and stops it automatically and adds to the total
+ *
+ * This is primarily used to measure time for buffer rewrites
*
* @param string $marker
*/
@@ -381,7 +381,7 @@
}
</script>
<noscript>
- <div style="width:0px;height:0px;"><img src="{$M.piwik_uri}/piwik.php?idsite=1" style="border:0" alt="" /></div>
+ <div style="width:0;height:0;"><img src="{$M.piwik_uri}/piwik.php?idsite=1" style="border:0" alt="" /></div>
</noscript>
{/if}
</div>

0 comments on commit f93b456

Please sign in to comment.