From fc110a7332a756891d5f8276d26f88a6e4113350 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 9 Nov 2012 12:09:46 +0100 Subject: [PATCH] [feature/soft-delete] Remove the current work around on ajax confirm problem PHPBB3-9567 --- phpBB/posting.php | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index 16dfad3b91..62c55d9ff4 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1599,7 +1599,7 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof } else { - global $template, $request; + global $user, $template, $request; $template->assign_vars(array( 'S_SOFTDELETED' => $post_data['post_visibility'] == ITEM_DELETED, @@ -1621,23 +1621,7 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof } // @todo: This needs fixing! AJAX confirm_box should be able to call template files! - if ($request->is_ajax()) - { - $l_confirm = (!isset($user->lang[$l_confirm . '_CONFIRM'])) ? $l_confirm : $user->lang[$l_confirm . '_CONFIRM']; - if ($auth->acl_gets('m_delete', 'f_delete', $forum_id) && $auth->acl_gets('m_softdelete', 'f_softdelete', $forum_id)) - { - $l_confirm .= '
' . $user->lang['DELETE_PERMANENTLY'] . ': '; - } - if ($auth->acl_get('m_softdelete', $forum_id)) - { - $l_confirm .= '
' . $user->lang['DELETE_REASON'] . ': '; - } - confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields)); - } - else - { - confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html'); - } + confirm_box(false, $l_confirm, build_hidden_fields($s_hidden_fields), 'confirm_delete_body.html'); } }