to avoid executing selects that have write side effects.
* Allow re-using username and password for all servers - saves re-entering
username and password for every server in a pool.
+* Make default language 'auto' indicating auto detect. If a language is
+ deliberately specifed, then that will always be used and no detection will
+ occur.
Bugs
* Tree Icons are displayed middle instead of top
* Central phpPgAdmin configuration. As a user you may modify the
* settings here for your particular configuration.
*
- * $Id: config.inc.php-dist,v 1.42 2005/06/22 14:21:09 chriskl Exp $
+ * $Id: config.inc.php-dist,v 1.43 2005/08/01 05:54:22 chriskl Exp $
*/
// An example server. Create as many of these as you wish,
//$conf['servers'][1]['pg_dumpall_path'] = 'C:\\Program Files\\PostgreSQL\\8.0\\bin\\pg_dumpall.exe';
//$conf['servers'][1]['slony_support'] = false;
- // Default language for the login screen if there's no translation
- // matching user's browser request. Eg: 'english', 'polish', etc.
- $conf['default_lang'] = 'english';
+ // Default language. Eg: 'english', 'polish', etc. See lang/ directory
+ // for all possibilities. If you specify 'auto' (the default) it will use
+ // your browser preference.
+ $conf['default_lang'] = 'auto';
// If extra login security is true, then logins via phpPgAdmin with no
// password or certain usernames (pgsql, postgres, root, administrator)
+++ /dev/null
-<?php
-
- /**
- * Slony plugin configuration
- *
- * $Id: slony.inc.php,v 1.2 2005/06/16 14:40:13 chriskl Exp $
- */
-
- $conf['slony_enabled'] = true;
-
-?>
/**
* Function library read in upon startup
*
- * $Id: lib.inc.php,v 1.101 2005/07/31 09:15:07 chriskl Exp $
+ * $Id: lib.inc.php,v 1.102 2005/08/01 05:54:31 chriskl Exp $
*/
include_once('decorator.inc.php');
include_once('./lang/translations.php');
}
// Determine language file to import:
-
// 1. Check for the language from a request var
if (isset($_REQUEST['language'])) {
$_language = strtolower($_REQUEST['language']);
}
// 3. Check for acceptable languages in HTTP_ACCEPT_LANGUAGE var
- if (!isset($_language) && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ if (!isset($_language) && $conf['default_lang'] == 'auto' && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
// extract acceptable language tags
// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4)
preg_match_all('/\s*([a-z]{1,8}(?:-[a-z]{1,8})*)(?:;q=([01](?:.[0-9]{0,3})?))?\s*(?:,|$)/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']), $_m, PREG_SET_ORDER);
unset($_acceptLang);
}
}
-
+
// 4. Otherwise resort to the default set in the config file
- if (!isset($_language) && isset($appLangFiles[$conf['default_lang']])) {
+ if (!isset($_language) && $conf['default_lang'] != 'auto' && isset($appLangFiles[$conf['default_lang']])) {
$_language = $conf['default_lang'];
}
-
+
// Import the language file
if (isset($_language)) {
include("./lang/recoded/{$_language}.php");