Update of /cvsroot/phpwiki/phpwiki In directory usw-pr-cvs1:/tmp/cvs-serv26187 Modified Files: index.php Log Message: LANG still broken, working on better locale handling. improved PageList: added checkbox, sortby added <?plugin-head for FrameInclude and RedirectTo fixed some minor UserPreferences quirks solidified templates added PhpWeather added a new generic WikiAdminSelect to simulate the commandline: work with sets of pages, pass the request to underlying WikiAdmin* plugins Index: index.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/index.php,v retrieving revision 1.91 retrieving revision 1.92 diff -u -2 -b -p -d -r1.91 -r1.92 --- index.php 24 Aug 2002 13:18:55 -0000 1.91 +++ index.php 27 Aug 2002 21:51:31 -0000 1.92 @@ -79,5 +79,5 @@ if (!empty($include_path)) ini_set('incl // Part Null: Don't touch this! -define ('PHPWIKI_VERSION', '1.3.4'); +define ('PHPWIKI_VERSION', '1.3.4pre'); require "lib/prepend.php"; rcs_id('$Id$'); @@ -86,5 +86,5 @@ rcs_id('$Id$'); // // Part One: -// Authentication and security settings: +// Authentication and security settings. See Part Three for more. // ///////////////////////////////////////////////////////////////////// @@ -199,5 +199,7 @@ $DBParams = array( //'dba_handler' => 'gdbm', // Either of 'gdbm' or 'db2' work great for me. //'dba_handler' => 'db2', - 'dba_handler' => 'db3', // Works fine on Windows, but not so on linux... + //'dba_handler' => 'db3', // Works fine on Windows, but not on every linux. + 'dba_handler' => 'dbm', // On sf.net redhat there's dbm and gdbm + 'timeout' => 20, //'timeout' => 5 @@ -278,5 +280,5 @@ $ExpireParams['author'] = array('max_age ///////////////////////////////////////////////////////////////////// -// The wiki is protected by HTTP Auth. Use the username and password +// The wiki can be protected by HTTP Auth. Use the username and password // from there, but this is not sufficient. Try the other methods also. if (!defined('ALLOW_HTTP_AUTH_LOGIN')) define('ALLOW_HTTP_AUTH_LOGIN', false); @@ -460,5 +462,5 @@ define("CHARSET", "iso-8859-1"); // valid locale before gettext() will work, i.e., use 'de_DE', // 'nl_NL'. -if (empty($LANG)) $LANG='C'; +if (empty($LANG)) $LANG='en'; //$LANG='nl_NL'; @@ -477,6 +479,24 @@ if (empty($LANG)) $LANG='C'; // You can tailor the locale used for time and date formatting by // setting the LC_TIME environment variable. You'll have to experiment -// to find the correct setting: -//putenv("LC_TIME=$LANG"); +// to find the correct setting. +// gettext() fix: With setlocale() we must use the long form, +// like 'de_DE','nl_NL', 'es_MX', 'es_AR', 'fr_FR'. +// For Windows maybe even 'german'. You might fix this accordingly. +$language_locales = array( + 'en' => 'C', + 'de' => 'de_DE', + 'es' => 'es_MX', + 'nl' => 'nl_NL', + 'fr' => 'fr_FR', + 'it' => 'it_IT', + 'sv' => 'sv_SV' + ); +if (empty($LC_ALL)) { + if (empty($language_locales['LANG'])) + $LC_ALL = $LANG; + else + $LC_ALL = $language_locales['LANG']; +} +putenv("LC_TIME=$LC_ALL"); /* WIKI_PGSRC -- specifies the source for the initial page contents of @@ -634,9 +654,9 @@ define('INTERWIKI_MAP_FILE', "lib/interw // Check if we were included by some other wiki version (getimg, en, ...) // or not. -// If we are original index.php fire up the code by loading lib/main.php. +// If the server requested this index.php fire up the code by loading lib/main.php. // Parallel wiki scripts can now simply include /index.php for the // main configuration, extend or redefine some settings and -// load lib/main.php by themselves. This overcomes the index as -// config problem. +// load lib/main.php by themselves. +// This overcomes the index as config problem. ////////////////////////////////////////////////////////////////