diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-04-02 13:10:55 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-04-02 13:10:55 +0200 |
commit | a895640245a3a1745e9d63f127fc47770556756c (patch) | |
tree | cedaeb6f644cb50c3efe0b9dda6a9803ccc68971 | |
parent | bd91925fe7675dbcfc8eedd0cd41d3c7014138ed (diff) | |
download | forums-a895640245a3a1745e9d63f127fc47770556756c.tar forums-a895640245a3a1745e9d63f127fc47770556756c.tar.gz forums-a895640245a3a1745e9d63f127fc47770556756c.tar.bz2 forums-a895640245a3a1745e9d63f127fc47770556756c.tar.xz forums-a895640245a3a1745e9d63f127fc47770556756c.zip |
Revert "[ticket/14562] Language fallback for extension permissions"
This reverts commit 621b958b1ca41e1def6349e07e0e3c8258a9d9f3.
-rw-r--r-- | phpBB/includes/functions_admin.php | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 9884e9b31a..a0073ec158 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2991,47 +2991,18 @@ function tidy_database() */ function add_permission_language() { - global $config, $user, $phpEx, $phpbb_extension_manager; + global $user, $phpEx, $phpbb_extension_manager; // add permission language files from extensions $finder = $phpbb_extension_manager->get_finder(); - // We grab the language files from the default, English and user's language. - // So we can fall back to the other files like we do when using add_lang() - $default_lang_files = $english_lang_files = $user_lang_files = array(); - - // Search for board default language if it's not the user language - if ($config['default_lang'] != $user->lang_name) - { - $default_lang_files = $finder - ->prefix('permissions_') - ->suffix(".$phpEx") - ->core_path('language/' . basename($config['default_lang']) . '/') - ->extension_directory('/language/' . basename($config['default_lang'])) - ->find(); - } - - // Search for english, if its not the default or user language - if ($config['default_lang'] != 'en' && $user->lang_name != 'en') - { - $english_lang_files = $finder - ->prefix('permissions_') - ->suffix(".$phpEx") - ->core_path('language/en/') - ->extension_directory('/language/en') - ->find(); - } - - // Find files in the user's language - $user_lang_files = $finder + $lang_files = $finder ->prefix('permissions_') ->suffix(".$phpEx") ->core_path('language/' . $user->lang_name . '/') ->extension_directory('/language/' . $user->lang_name) ->find(); - $lang_files = array_merge($english_lang_files, $default_lang_files, $user_lang_files); - foreach ($lang_files as $lang_file => $ext_name) { if ($ext_name === '/') |