diff options
author | hubaishan <saeed@hubaishan.com> | 2017-11-13 13:21:33 +0300 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-12-27 20:54:15 +0100 |
commit | c906335ce42abc6b43c1d77616c2328e8e94d356 (patch) | |
tree | d00ffe9f9dab24bf8f751f84b16828fb30b1a4cf | |
parent | 44d5bde61604979ea6f89951e78edf352f8a9bb5 (diff) | |
download | forums-c906335ce42abc6b43c1d77616c2328e8e94d356.tar forums-c906335ce42abc6b43c1d77616c2328e8e94d356.tar.gz forums-c906335ce42abc6b43c1d77616c2328e8e94d356.tar.bz2 forums-c906335ce42abc6b43c1d77616c2328e8e94d356.tar.xz forums-c906335ce42abc6b43c1d77616c2328e8e94d356.zip |
[ticket/15453] Add core event after language deleted in acp_language.php
Add core event after language deleted in acp_language.php
PHPBB3-15453
-rw-r--r-- | phpBB/includes/acp/acp_language.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 4baff921b6..d81154b4ff 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -32,7 +32,7 @@ class acp_language function main($id, $mode) { global $config, $db, $user, $template, $phpbb_log, $phpbb_container; - global $phpbb_root_path, $phpEx, $request; + global $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher; if (!function_exists('validate_language_iso_name')) { @@ -229,7 +229,20 @@ class acp_language $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_LANGUAGE_PACK_DELETED', false, array($row['lang_english_name'])); - trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action)); + $delete_message = sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']); + $lang_iso = $row['lang_iso']; + /** + * Run code after language deleted + * + * @event core.acp_language_after_delete + * @var string lang_iso Language ISO code + * @var string delete_message Delete message appear to user + * @since 3.2.2-RC1 + */ + $vars = array('lang_iso', 'delete_message'); + extract($phpbb_dispatcher->trigger_event('core.acp_language_after_delete', compact($vars))); + + trigger_error($delete_message . adm_back_link($this->u_action)); } else { |