diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-19 11:58:44 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-01-19 11:58:44 +0000 |
| commit | 84c3a073dff69fc51c3975ff62de34e59b40f32c (patch) | |
| tree | 41b7fd4f7077db3c0f5dadea84718681ac5bad04 /phpBB/install/index.php | |
| parent | 2c4a82fdd3f1076b38c2bcb8e2b4ba2a19f96362 (diff) | |
| download | forums-84c3a073dff69fc51c3975ff62de34e59b40f32c.tar forums-84c3a073dff69fc51c3975ff62de34e59b40f32c.tar.gz forums-84c3a073dff69fc51c3975ff62de34e59b40f32c.tar.bz2 forums-84c3a073dff69fc51c3975ff62de34e59b40f32c.tar.xz forums-84c3a073dff69fc51c3975ff62de34e59b40f32c.zip | |
some opendir/closedir fixes
git-svn-id: file:///svn/phpbb/trunk@6908 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/index.php')
| -rwxr-xr-x | phpBB/install/index.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 448342b63b..24ae6c16a3 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -147,7 +147,7 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language) // dir, this may or may not be English if (!$language) { - $dir = @opendir($phpbb_root_path . 'language'); + $dir = opendir($phpbb_root_path . 'language'); while (($file = readdir($dir)) !== false) { $path = $phpbb_root_path . 'language/' . $file; @@ -158,6 +158,7 @@ if (!$language) break; } } + closedir($dir); } // And finally, load the relevant language files @@ -220,7 +221,12 @@ class module $module = array(); // Grab module information using Bart's "neat-o-module" system (tm) - $dir = @opendir('.'); + $dir = opendir('.'); + + if (!$dir) + { + $this->error('Unable to access the installation directory', __LINE__, __FILE__); + } $setmodules = 1; while (($file = readdir($dir)) !== false) @@ -230,7 +236,7 @@ class module include($file); } } - @closedir($dir); + closedir($dir); unset($setmodules); @@ -648,7 +654,7 @@ class module { global $phpbb_root_path, $phpEx; - $dir = @opendir($phpbb_root_path . 'language'); + $dir = opendir($phpbb_root_path . 'language'); while ($file = readdir($dir)) { @@ -665,7 +671,7 @@ class module $lang[$localname] = $file; } } - @closedir($dir); + closedir($dir); @asort($lang); @reset($lang); |
