Skip to content

Commit

Permalink
Merge pull request #1522 from Antes/delete-topic
Browse files Browse the repository at this point in the history
Delete topic
  • Loading branch information
Oldiesmann committed May 8, 2014
2 parents 67a6732 + 63259b0 commit 9a82917
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Themes/default/Display.template.php
Expand Up @@ -912,7 +912,10 @@ function template_single_post($message, $force_alternate = null)
<li><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '" class="modify_button">', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
if ($context['can_delete'] && ($context['topic_first_message'] == $message['id']))
echo '
<li><a href="', $scripturl, '?action=removetopic2;topic=', $context['current_topic'], '.', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['are_sure_remove_topic'], '?\');" class="remove_button">', $txt['remove_topic'],'</a></li>';
elseif ($message['can_remove'] && ($context['topic_first_message'] != $message['id']))
echo '
<li><a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_message'], '?\');" class="remove_button">', $txt['remove'], '</a></li>';

Expand Down

0 comments on commit 9a82917

Please sign in to comment.