Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/localization
In directory usw-pr-cvs1:/tmp/cvs-serv11698/chat/localization
Modified Files:
languages.lib.php3
Log Message:
* a closing parenthesis was missing
* put cache files in their own directory
Index: languages.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/localization/languages.lib.php3,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** languages.lib.php3 2001/11/30 19:31:39 1.12
--- languages.lib.php3 2001/12/01 10:49:35 1.13
***************
*** 46,53 ****
global $dbSessionVars;
- $notFound = true;
reset($availableLanguages);
! while ($notFound && list($key, $name) = each($availableLanguages))
{
// $envType = 0 for a simple session value,
--- 46,52 ----
global $dbSessionVars;
reset($availableLanguages);
! while (list($key, $name) = each($availableLanguages))
{
// $envType = 0 for a simple session value,
***************
*** 59,63 ****
{
$dbSessionVars['lang'] = $availableLanguages[$key];
! $notFound = false;
}
}
--- 58,62 ----
{
$dbSessionVars['lang'] = $availableLanguages[$key];
! break;
}
}
***************
*** 72,78 ****
// Defines the path to the localization directory
$localizationPath = (defined('_CHAT_PATH') ? _CHAT_PATH : '') . 'localization/';
! $localizationCache = $localizationPath . 'availableLanguages.cache';
! if (file_exists($localizationCache) && filemtime($localizationCache) + 60*60 - time()) > 0)
{
// Cache is up to date, we use it
--- 71,77 ----
// Defines the path to the localization directory
$localizationPath = (defined('_CHAT_PATH') ? _CHAT_PATH : '') . 'localization/';
! $localizationCache = (defined('_CHAT_PATH') ? _CHAT_PATH : '') . 'cache/availableLanguages.cache';
! if (file_exists($localizationCache) && (filemtime($localizationCache) + 60*60 - time()) > 0)
{
// Cache is up to date, we use it
***************
*** 105,109 ****
// Store the result in a cache file to limit server load
! if($cacheFile = @fopen($localizationCache, "w"))
{
fwrite($cacheFile, serialize($availableLanguages));
--- 104,108 ----
// Store the result in a cache file to limit server load
! if ($cacheFile = @fopen($localizationCache, 'w'))
{
fwrite($cacheFile, serialize($availableLanguages));
***************
*** 112,115 ****
--- 111,115 ----
}
+
/**
* Get some predefined variables
***************
*** 133,137 ****
// want it to be changed -> do nothing
else if ((dbSessionIsRegistered('lang') && !empty($dbSessionVars['lang']))
! && empty($lang))
{
// void
--- 133,137 ----
// want it to be changed -> do nothing
else if ((dbSessionIsRegistered('lang') && !empty($dbSessionVars['lang']))
! && empty($lang))
{
// void
|