From de4133420a53b7c3187b94e2bfcff1a51444b5cd Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 28 Oct 2002 00:34:43 +0000 Subject: Rules and lang changes git-svn-id: file:///svn/phpbb/trunk@2976 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 72f4242d32..9e101ae43b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -256,12 +256,10 @@ function language_select($default, $select_name = "language", $dirname="language $user = array(); while ( $file = readdir($dir) ) { - if ( preg_match('#^lang_#', $file) && !is_file($dirname . '/' . $file) && !is_link($dirname . '/' . $file) ) + if ( file_exists($dirname . '/' . $file . '/iso.txt') ) { - $filename = trim(str_replace('lang_', '', $file)); - $displayname = preg_replace('/^(.*?)_(.*)$/', '\\1 [ \\2 ]', $filename); - $displayname = preg_replace('/\[(.*?)_(.*)\]/', '[ \\1 - \\2 ]', $displayname); - $user->lang[$displayname] = $filename; + list($displayname) = file($dirname . '/' . $file . '/iso.txt'); + $lang[$displayname] = $dirname . '/' . $file; } } @@ -271,7 +269,7 @@ function language_select($default, $select_name = "language", $dirname="language @reset($user); $user_select = '