cvs: phpweb /include langchooser.inc

From: Date: Sat, 18 Jan 2003 15:16:04 +0000
Subject: cvs: phpweb /include langchooser.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-15125@lists.php.net to get a copy of this message
goba Sat Jan 18 10:16:04 2003 EDT Modified files: /phpweb/include langchooser.inc Log: Also take in account the array of available langauges, so we need not check for files which should not be there... Index: phpweb/include/langchooser.inc diff -u phpweb/include/langchooser.inc:1.2 phpweb/include/langchooser.inc:1.3 --- phpweb/include/langchooser.inc:1.2 Tue Jan 7 17:15:57 2003 +++ phpweb/include/langchooser.inc Sat Jan 18 10:16:03 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: langchooser.inc,v 1.2 2003/01/07 22:15:57 goba Exp $ +// $Id: langchooser.inc,v 1.3 2003/01/18 15:16:03 goba Exp $ /* @@ -56,7 +56,7 @@ // Add a language to the possible languages' list function language_add($langcode) { - global $LANGS; + global $LANGS, $LANGUAGES; // Make language code lowercase $langcode = strtolower($langcode); @@ -67,7 +67,7 @@ // Append language code in priority order // if it is not there already [try to lower number // of file_exists() calls to minumum] - if (!in_array($langcode, $LANGS)) { $LANGS[] = $langcode; } + if (!in_array($langcode, $LANGS) && isset($LANGUAGES[$langcode]) { $LANGS[] = $langcode; } } ?>

« previous php.mirrors (#15125) next »