diff options
Diffstat (limited to 'phpBB/includes/acp/acp_board.php')
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 3d3254d7d3..4216464718 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -397,16 +397,21 @@ class acp_board // Retrieve a list of auth plugins and check their config values $auth_plugins = array(); - $dp = opendir($phpbb_root_path . 'includes/auth'); - while (($file = readdir($dp)) !== false) + $dp = @opendir($phpbb_root_path . 'includes/auth'); + + if ($dp) { - if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file)) + while (($file = readdir($dp)) !== false) { - $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file); + if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file)) + { + $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file); + } } - } + closedir($dp); - sort($auth_plugins); + sort($auth_plugins); + } $updated_auth_settings = false; $old_auth_config = array(); @@ -575,7 +580,13 @@ class acp_board $auth_plugins = array(); - $dp = opendir($phpbb_root_path . 'includes/auth'); + $dp = @opendir($phpbb_root_path . 'includes/auth'); + + if (!$dp) + { + return ''; + } + while (($file = readdir($dp)) !== false) { if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file)) @@ -583,6 +594,7 @@ class acp_board $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file); } } + closedir($dp); sort($auth_plugins); |