diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 2 | ||||
-rwxr-xr-x | phpBB/install/index.php | 18 | ||||
-rw-r--r-- | phpBB/install/install_convert.php | 8 | ||||
-rwxr-xr-x | phpBB/install/install_install.php | 8 |
4 files changed, 30 insertions, 6 deletions
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 5923c92ac1..bdde227e95 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1282,7 +1282,7 @@ function phpbb_import_avatar($user_avatar) else if ($convert_row['user_avatar_type'] == 1) { // Uploaded avatar - return import_avatar($user_avatar, ''); + return import_avatar($user_avatar); } else if ($convert_row['user_avatar_type'] == 2) { diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 24ae6c16a3..b02fc5d973 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -147,7 +147,14 @@ 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'); + + if (!$dir) + { + die('Unable to access the language directory'); + exit; + } + while (($file = readdir($dir)) !== false) { $path = $phpbb_root_path . 'language/' . $file; @@ -221,7 +228,7 @@ class module $module = array(); // Grab module information using Bart's "neat-o-module" system (tm) - $dir = opendir('.'); + $dir = @opendir('.'); if (!$dir) { @@ -654,7 +661,12 @@ class module { global $phpbb_root_path, $phpEx; - $dir = opendir($phpbb_root_path . 'language'); + $dir = @opendir($phpbb_root_path . 'language'); + + if (!$dir) + { + $this->error('Unable to access the language directory', __LINE__, __FILE__); + } while ($file = readdir($dir)) { diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 0227b0316d..3ae6b8be1c 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -215,7 +215,13 @@ class install_convert extends module $convertors = $sort = array(); $get_info = true; - $handle = opendir('./convertors/'); + $handle = @opendir('./convertors/'); + + if (!$handle) + { + $this->error('Unable to access the convertors directory', __LINE__, __FILE__); + } + while ($entry = readdir($handle)) { if (preg_match('/^convert_([a-z0-9_]+).' . $phpEx . '/i', $entry, $m)) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 6ba31c6039..7bfecd1685 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1603,7 +1603,13 @@ class install_install extends module { global $db, $lang, $phpbb_root_path, $phpEx; - $dir = opendir($phpbb_root_path . 'language'); + $dir = @opendir($phpbb_root_path . 'language'); + + if (!$dir) + { + $this->error('Unable to access the language directory', __LINE__, __FILE__); + } + while (($file = readdir($dir)) !== false) { $path = $phpbb_root_path . 'language/' . $file; |