- Translations are loaded automatically from locale/<localename>/setup.php
files (#1240889).
- Allow configure to be ran from any directory, thanks Ceri Davies.
+ - Removed $available_languages configuration option. List is limited to
+ installed translations. Similar feature is implemented in limit_languages
+ plugin.
+ - Don't load plugins/administrator/auth.php during plugin initiation.
Version 1.5.0 - 2 February 2004
-------------------------------
$default_use_javascript_addr_book = 'false' if (! $default_use_javascript_addr_book);
# since 1.5.0
$show_alternative_names = 'false' if ( !$show_alternative_names );
-$available_languages = 'all' if ( !$available_languages );
+# $available_languages option available only in 1.5.0. removed due to $languages
+# implementation changes. options are provided by limit_languages plugin
+# $available_languages = 'all' if ( !$available_languages );
$aggressive_decoding = 'false' if ( !$aggressive_decoding );
$advanced_tree = 'false' if ( !$advanced_tree );
$use_php_recode = 'false' if ( !$use_php_recode );
print "1. Default Language : $WHT$squirrelmail_default_language$NRM\n";
print "2. Default Charset : $WHT$default_charset$NRM\n";
print "3. Show alternative language names : $WHT$show_alternative_names$NRM\n";
- print "4. Available languages : $WHT$available_languages$NRM\n";
- print "5. Enable aggressive decoding : $WHT$aggressive_decoding$NRM\n";
- print "6. Enable lossy encoding : $WHT$lossy_encoding$NRM\n";
+ print "4. Enable aggressive decoding : $WHT$aggressive_decoding$NRM\n";
+ print "5. Enable lossy encoding : $WHT$lossy_encoding$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ( $menu == 11 ) {
elsif ( $command == 11 ) { $addrbook_global_listing = command911(); }
} elsif ( $menu == 10 ) {
if ( $command == 1 ) { $squirrelmail_default_language = commandA1(); }
- elsif ( $command == 2 ) { $default_charset = commandA2(); }
+ elsif ( $command == 2 ) { $default_charset = commandA2(); }
elsif ( $command == 3 ) { $show_alternative_names = commandA3(); }
- elsif ( $command == 4 ) { $available_languages = commandA4(); }
- elsif ( $command == 5 ) { $aggressive_decoding = commandA5(); }
- elsif ( $command == 6 ) { $lossy_encoding = commandA6(); }
+ elsif ( $command == 4 ) { $aggressive_decoding = commandA4(); }
+ elsif ( $command == 5 ) { $lossy_encoding = commandA5(); }
} elsif ( $menu == 11 ) {
if ( $command == 1 ) { $advanced_tree = commandB1(); }
if ( $command == 2 ) { $use_iframe = commandB2(); }
# Alternative language names
sub commandA3 {
print "Enable this option if you want to see localized language names in\n";
- print "language selection box. Note, that if don't limit list of available\n";
- print "languages, this option can trigger installation of foreign language\n";
- print "support modules in some browsers.\n";
+ print "language selection box. Note, that this option can trigger\n";
+ print "installation of foreign language support modules in some browsers.\n";
print "\n";
if ( lc($show_alternative_names) eq 'true' ) {
}
return $show_alternative_names;
}
-# Available languages
-sub commandA4 {
- print "This option allows to limit number of languages available in\n";
- print "language selection box. You can enter as code of every language that\n";
- print "you want to enable. Language codes should be separated by space. If you\n";
- print "enter name unsupported by SquirrelMail, it will be ignored. If you enter\n";
- print "special key \'all\' - all languages available in SquirrelMail will be\n";
- print "listed. If you enter special key \'none\' - user won't be able to change";
- print "language and interface will use language set it \"Default language\" option.\n";
- print "\n";
- print "You can find valid language names in doc/i18n.txt.\n";
- print "\n";
- print "[$WHT$available_languages$NRM]: $WHT";
- $new_available_languages = <STDIN>;
- if ( $new_available_languages eq "\n" ) {
- $new_available_languages = $available_languages;
- } else {
- $new_available_languages =~ s/[\r\n]//g;
- $new_available_languages =~ s/^\s+$//g;
- }
- return $new_available_languages;
-}
+
# Aggressive decoding
-sub commandA5 {
+sub commandA4 {
print "Enable this option if you want to use CPU and memory intensive decoding\n";
print "functions. This option allows reading multibyte charset, that are used\n";
print "in Eastern Asia. SquirrelMail will try to use recode functions here,\n";
}
# Lossy encoding
-sub commandA6 {
+sub commandA5 {
print "Enable this option if you want to allow lossy charset encoding in message\n";
print "composition pages. This option allows charset conversions when output\n";
print "charset does not support all symbols used in original charset. Symbols\n";
print CF "\$default_charset = '$default_charset';\n";
# boolean
print CF "\$show_alternative_names = $show_alternative_names;\n";
- # string
- print CF "\$available_languages = '$available_languages';\n";
# boolean
print CF "\$aggressive_decoding = $aggressive_decoding;\n";
# boolean
*/
$default_charset = 'iso-8859-1';
-/**
- * Available Languages
- *
- * This option controls number of languages available to end user in
- * language selection preferences. You can use space separated list
- * of translations installed in locale/ directory or special keys
- * 'all' (all languages are available) and 'none' (language selection
- * is disabled, interface is set to $squirrelmail_default_language
- * @global string $available_languages
- * @since 1.5.0
- */
-$available_languages = 'all';
-
/**
* Alternative Language Names Control
*
function load_optpage_data_display() {
global $theme, $language, $languages,
$default_use_mdn, $squirrelmail_language, $allow_thread_sort,
- $show_alternative_names, $available_languages, $use_icons, $use_iframe;
+ $show_alternative_names, $use_icons, $use_iframe;
/* Build a simple array into which we will build options. */
$optgrps = array();
}
- // config.php can be unupdated.
- if (! isset($available_languages) || $available_languages=="" ) {
- $available_languages="ALL"; }
-
$language_values = array();
- if ( strtoupper($available_languages)=='ALL') {
- foreach ($languages as $lang_key => $lang_attributes) {
- if (isset($lang_attributes['NAME'])) {
- $language_values[$lang_key] = $lang_attributes['NAME'];
- if ( isset($show_alternative_names) &&
- $show_alternative_names &&
- isset($lang_attributes['ALTNAME']) ) {
- $language_values[$lang_key] .= " / " . $lang_attributes['ALTNAME'];
- }
- }
- }
- } else if (strtoupper($available_languages)!='NONE') {
- // admin can set list of available languages in config
- $available_languages_array=explode (" ",$available_languages);
- foreach ($available_languages_array as $lang_key ) {
- if (isset($languages[$lang_key]['NAME'])) {
- $language_values[$lang_key] = $languages[$lang_key]['NAME'];
- if ( isset($show_alternative_names) &&
- $show_alternative_names &&
- isset($languages[$lang_key]['ALTNAME']) ) {
- $language_values[$lang_key] .= " / " . $languages[$lang_key]['ALTNAME'];
- }
+ foreach ($languages as $lang_key => $lang_attributes) {
+ if (isset($lang_attributes['NAME'])) {
+ $language_values[$lang_key] = $lang_attributes['NAME'];
+ if ( isset($show_alternative_names) &&
+ $show_alternative_names &&
+ isset($lang_attributes['ALTNAME']) ) {
+ $language_values[$lang_key] .= " / " . $lang_attributes['ALTNAME'];
}
}
}
+
asort($language_values);
$language_values =
array_merge(array('' => _("Default")), $language_values);
$language = $squirrelmail_language;
- if (strtoupper($available_languages)!='NONE') {
- // if set to 'none', interface will use only default language
- $optvals[SMOPT_GRP_GENERAL][] = array(
- 'name' => 'language',
- 'caption' => _("Language"),
- 'type' => SMOPT_TYPE_STRLIST,
- 'refresh' => SMOPT_REFRESH_ALL,
- 'posvals' => $language_values,
- 'htmlencoded' => true
- );
- }
+
+ // TODO: maybe we can add count($language_values) check here
+ $optvals[SMOPT_GRP_GENERAL][] = array(
+ 'name' => 'language',
+ 'caption' => _("Language"),
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'refresh' => SMOPT_REFRESH_ALL,
+ 'posvals' => $language_values,
+ 'htmlencoded' => true
+ );
/* Set values for the "use javascript" option. */
$optvals[SMOPT_GRP_GENERAL][] = array(
* @subpackage administrator
*/
+/** @ignore */
+if (!defined('SM_PATH')) define('SM_PATH','../../');
+
/** */
require_once( SM_PATH . 'functions/constants.php' );
define('SMOPT_TYPE_EXTERNAL', 32);
define('SMOPT_TYPE_PATH',33);
-global $languages;
+global $languages, $version;
$language_values = array( );
foreach ($languages as $lang_key => $lang_attributes) {
'iso-2022-jp' => 'iso-2022-jp' ) ),
'$show_alternative_names' => array( 'name' => _("Show alternative language names"),
'type' => SMOPT_TYPE_BOOLEAN ),
- '$available_languages' => array( 'name' => _("Available languages"),
- 'type' => SMOPT_TYPE_STRING,
- 'size' => 40 ),
'$aggressive_decoding' => array( 'name' => _("Enable aggressive decoding"),
'type' => SMOPT_TYPE_BOOLEAN ),
'$lossy_encoding' => array( 'name' => _("Enable lossy encoding"),