From 383e27dba8057fbbafc83590bc6a98ce774b8634 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 7 May 2007 21:13:18 +0000 Subject: [PATCH] #10627 - revert previous permission inclusion change, forgot that that permissions_phpbb indeed need to be added as the first file. git-svn-id: file:///svn/phpbb/trunk@7502 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_admin.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 8581cc328d..96059191f0 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2955,9 +2955,12 @@ function add_permission_language() { global $user, $phpEx; + // First of all, our own file. We need to include it as the first file because it presets all relevant variables. + $user->add_lang('acp/permissions_phpbb'); + $files_to_add = array(); - // Search in acp and mods folder for permissions_ files. + // Now search in acp and mods folder for permissions_ files. foreach (array('acp/', 'mods/') as $path) { $dh = @opendir($user->lang_path . $path); @@ -2966,7 +2969,7 @@ function add_permission_language() { while (($file = readdir($dh)) !== false) { - if (strpos($file, 'permissions_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx) + if ($file !== 'permissions_phpbb.' . $phpEx && strpos($file, 'permissions_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx) { $files_to_add[] = $path . substr($file, 0, -(strlen($phpEx) + 1)); }