Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization
In directory usw-pr-cvs1:/tmp/cvs-serv31695/chat/localization
Modified Files:
languages.lib.php3
Log Message:
Fix a problem related to a PHP bug with constants :[
Index: languages.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/languages.lib.php3,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** languages.lib.php3 2001/04/20 17:03:39 1.5
--- languages.lib.php3 2001/04/27 18:30:28 1.6
***************
*** 67,85 ****
* Creates the array containing available languages
*/
! // Ensures the _CHAT_PATH constant is defined
! if (!defined('_CHAT_PATH'))
! define('_CHAT_PATH', '');
// Defines available languages
$availableLanguages = array();
! $languageDirectories = dir('./' . _CHAT_PATH . 'localization/');
while ($name = $languageDirectories->read())
{
! if (is_dir('./' . _CHAT_PATH . 'localization/' . $name)
! && file_exists('./' . _CHAT_PATH . 'localization/' . $name . '/regex.txt')
! && file_exists('./' . _CHAT_PATH . 'localization/' . $name . '/chat.loc')
! && file_exists('./' . _CHAT_PATH . 'localization/' . $name . '/flag.gif'))
{
! list($key) = file('./' . _CHAT_PATH . 'localization/' . $name . '/regex.txt');
$availableLanguages[$key] = $name;
}
--- 67,84 ----
* Creates the array containing available languages
*/
! // Defines the path to the localization directory
! $localizationPath = (defined('_CHAT_PATH') ? _CHAT_PATH : '') . 'localization/';
// Defines available languages
$availableLanguages = array();
! $languageDirectories = dir($localizationPath);
while ($name = $languageDirectories->read())
{
! if (is_dir($localizationPath . $name)
! && file_exists($localizationPath . $name . '/regex.txt')
! && file_exists($localizationPath . $name . '/chat.loc')
! && file_exists($localizationPath . $name . '/flag.gif'))
{
! list($key) = file($localizationPath . $name . '/regex.txt');
$availableLanguages[$key] = $name;
}
***************
*** 89,93 ****
// Sorts the $availableLanguages array in a convenient order
if (!function_exists('krsort'))
! include('./' . _CHAT_PATH . 'localization/sort_languages.lib.' . C_EXTENSION);
krsort($availableLanguages);
--- 88,92 ----
// Sorts the $availableLanguages array in a convenient order
if (!function_exists('krsort'))
! include($localizationPath . 'sort_languages.lib.' . C_EXTENSION);
krsort($availableLanguages);
|