aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6cfbd9db8f..c85f2c0c61 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -331,13 +331,16 @@ function language_select($default, $select_name = "language", $dirname="language
$user = array();
while ( $file = readdir($dir) )
{
- if ( file_exists($dirname . '/' . $file . '/iso.txt') )
+ if (!is_dir($dirname . '/' . $file))
+ {
+ continue;
+ }
+ if ( @file_exists($dirname . '/' . $file . '/iso.txt') )
{
list($displayname) = file($dirname . '/' . $file . '/iso.txt');
- $lang[$displayname] = $dirname . '/' . $file;
+ $lang[$displayname] = $file;
}
}
-
@closedir($dir);
@asort($lang);