aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-01-02 15:40:53 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-01-02 15:40:53 +0000
commit315f21d087a56fecc57f02a093ebc0641e2ebb9c (patch)
treecd15d9857f5e6062ee68e8b729833da49545880f /phpBB/includes/functions.php
parent0c7dec9e546dcd8c9d5e54e3af53ad6131810729 (diff)
downloadforums-315f21d087a56fecc57f02a093ebc0641e2ebb9c.tar
forums-315f21d087a56fecc57f02a093ebc0641e2ebb9c.tar.gz
forums-315f21d087a56fecc57f02a093ebc0641e2ebb9c.tar.bz2
forums-315f21d087a56fecc57f02a093ebc0641e2ebb9c.tar.xz
forums-315f21d087a56fecc57f02a093ebc0641e2ebb9c.zip
Clean up display of languages, limit to directory names only
git-svn-id: file:///svn/phpbb/trunk@1775 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 378ec6b2e2..eb8b6cd15e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -740,15 +740,15 @@ function language_select($default, $select_name = "language", $dirname="language
$dir = opendir($dirname);
$lang_select = "<select name=\"$select_name\">";
- while ($file = readdir($dir))
+ while($file = readdir($dir))
{
- if (ereg("^lang_", $file))
+ if( ereg("^lang_", $file) && !is_file($dirname . $file) && !is_link($dirname . $file) )
{
$filename = str_replace("lang_", "", $file);
$displayname = preg_replace("/(.*)_(.*)/", "\\1 [ \\2 ]", $filename);
- $selected = (strtolower($default) == strtolower($filename)) ? " selected=\"selected\"" : "";
+ $selected = ( strtolower($default) == strtolower($filename) ) ? " selected=\"selected\"" : "";
$lang_select .= "<option value=\"$filename\"$selected>" . ucwords($displayname) . "</option>";
}
}