From 31e546c5e4ecd012ef9d93fa68f42c793e417303 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 20 Jan 2007 17:58:27 +0000 Subject: - 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 --- phpBB/includes/functions_admin.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/functions_admin.php') diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index cb31e3567a..4b40525881 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -345,7 +345,13 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png') return false; } - $dh = opendir($rootdir . $dir); + $dh = @opendir($rootdir . $dir); + + if (!$dh) + { + return false; + } + while (($fname = readdir($dh)) !== false) { if (is_file("$rootdir$dir$fname")) @@ -2677,9 +2683,9 @@ function add_permission_language() // Now search in acp and mods folder for permissions_ files. foreach (array('acp/', 'mods/') as $path) { - $dh = opendir($user->lang_path . $path); + $dh = @opendir($user->lang_path . $path); - if ($dh !== false) + if ($dh) { while (($file = readdir($dh)) !== false) { -- cgit v1.2.1