aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_board.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-01-20 17:58:27 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-01-20 17:58:27 +0000
commit31e546c5e4ecd012ef9d93fa68f42c793e417303 (patch)
tree205934c32a9aff1bf4369b1f157d5d55abc1f3f6 /phpBB/includes/acp/acp_board.php
parentfae887b3a106fef9fb5828f636402d5323ba300d (diff)
downloadforums-31e546c5e4ecd012ef9d93fa68f42c793e417303.tar
forums-31e546c5e4ecd012ef9d93fa68f42c793e417303.tar.gz
forums-31e546c5e4ecd012ef9d93fa68f42c793e417303.tar.bz2
forums-31e546c5e4ecd012ef9d93fa68f42c793e417303.tar.xz
forums-31e546c5e4ecd012ef9d93fa68f42c793e417303.zip
- fixing some bugs
- removing utf8 characters from email files (has been discussed internally, you guys know why) - making sure some opendir calls are checked before calling readdir. git-svn-id: file:///svn/phpbb/trunk@6912 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_board.php')
-rw-r--r--phpBB/includes/acp/acp_board.php26
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);