diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-20 17:58:27 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-20 17:58:27 +0000 |
commit | 31e546c5e4ecd012ef9d93fa68f42c793e417303 (patch) | |
tree | 205934c32a9aff1bf4369b1f157d5d55abc1f3f6 /phpBB/includes/functions_admin.php | |
parent | fae887b3a106fef9fb5828f636402d5323ba300d (diff) | |
download | forums-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/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 12 |
1 files changed, 9 insertions, 3 deletions
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) { |