diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-04-17 09:26:11 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-04-17 09:26:11 +0200 |
commit | c8ff4b41096c31a67b7cf534bba78c442d285b73 (patch) | |
tree | 915c0523c512a67ab9bd74dc6ab2d431efe46826 /phpBB/includes/mcp | |
parent | 507efee633fee769e7e2af4a2b298c951193f800 (diff) | |
parent | 0e38bebaa56dcf8921df99e8eb85e3046721dd13 (diff) | |
download | forums-c8ff4b41096c31a67b7cf534bba78c442d285b73.tar forums-c8ff4b41096c31a67b7cf534bba78c442d285b73.tar.gz forums-c8ff4b41096c31a67b7cf534bba78c442d285b73.tar.bz2 forums-c8ff4b41096c31a67b7cf534bba78c442d285b73.tar.xz forums-c8ff4b41096c31a67b7cf534bba78c442d285b73.zip |
Merge pull request #5513 from mrgoldy/ticket/15942
[ticket/15942] Allow array in confirm_box title
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 065e9bba12..c3e3ade160 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -974,10 +974,11 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = '' 'DELETE_TOPIC_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_TOPIC_PERMANENTLY', count($topic_ids)), )); - $l_confirm = (count($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS'; + $count = count($topic_ids); + $l_confirm = $count === 1 ? 'DELETE_TOPIC' : 'DELETE_TOPICS'; if ($only_softdeleted) { - $l_confirm .= '_PERMANENTLY'; + $l_confirm = array($l_confirm . '_PERMANENTLY', $count); $s_hidden_fields['delete_permanent'] = '1'; } else if ($only_shadow || !$auth->acl_get('m_softdelete', $forum_id)) @@ -1228,10 +1229,11 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '', 'DELETE_POST_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_POST_PERMANENTLY', count($post_ids)), )); - $l_confirm = (count($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS'; + $count = count($post_ids); + $l_confirm = $count === 1 ? 'DELETE_POST' : 'DELETE_POSTS'; if ($only_softdeleted) { - $l_confirm .= '_PERMANENTLY'; + $l_confirm = array($l_confirm . '_PERMANENTLY', $count); $s_hidden_fields['delete_permanent'] = '1'; } else if (!$auth->acl_get('m_softdelete', $forum_id)) |