mailbox_display_button_action to promote the new location
- Making delete button, when viewing a message, consider which page was viewed
before.
+ - $agresive_decoding configuration option changed to $aggressive_decoding.
+ Fixed spelling.
+ - Added $loosy_encoding option (provides fix for #806698)
Version 1.5.0
--------------------
$session_name = 'SQMSESSID' if ( !$session_name );
$show_alternative_names = 'false' if ( !$show_alternative_names );
$available_languages = 'all' if ( !$available_languages );
-$agresive_decoding = 'false' if ( !$agresive_decoding );
+$aggressive_decoding = 'false' if ( !$aggressive_decoding );
+$loosy_encoding = 'false' if ( !$loosy_encoding );
$advanced_tree = 'false' if ( !$advanced_tree );
$oldway = 'false' if ( !$oldway );
$use_icons = 'false' if ( !$use_icons );
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. Use agresive decoding : $WHT$agresive_decoding$NRM\n";
+ print "5. Enable aggressive decoding : $WHT$aggressive_decoding$NRM\n";
+ print "6. Enable loosy encoding : $WHT$loosy_encoding$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ( $menu == 11 ) {
elsif ( $command == 2 ) { $default_charset = commandA2(); }
elsif ( $command == 3 ) { $show_alternative_names = commandA3(); }
elsif ( $command == 4 ) { $available_languages = commandA4(); }
- elsif ( $command == 5 ) { $agresive_decoding = commandA5(); }
+ elsif ( $command == 5 ) { $aggressive_decoding = commandA5(); }
+ elsif ( $command == 6 ) { $loosy_encoding = commandA6(); }
} elsif ( $menu == 11 ) {
if ( $command == 1 ) { $advanced_tree = commandB1(); }
elsif ( $command == 2 ) { $oldway = commandB2(); }
}
return $new_available_languages;
}
-# Agresive decoding
+# Aggressive decoding
sub commandA5 {
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 "even when you have disabled use of recode in Tweaks section.\n";
print "\n";
- if ( lc($agresive_decoding) eq 'true' ) {
+ if ( lc($aggressive_decoding) eq 'true' ) {
$default_value = "y";
} else {
$default_value = "n";
}
- print "Use agresive decoding? (y/n) [$WHT$default_value$NRM]: $WHT";
- $agresive_decoding = <STDIN>;
- if ( ( $agresive_decoding =~ /^y\n/i ) || ( ( $agresive_decoding =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
- $agresive_decoding = 'true';
+ print "Enable aggressive decoding? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $aggressive_decoding = <STDIN>;
+ if ( ( $aggressive_decoding =~ /^y\n/i ) || ( ( $aggressive_decoding =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $aggressive_decoding = 'true';
} else {
- $agresive_decoding = 'false';
+ $aggressive_decoding = 'false';
}
- return $agresive_decoding;
+ return $aggressive_decoding;
}
+# Loosy encoding
+sub commandA6 {
+ print "Enable this option if you want to allow loosy 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 "unsupported by output charset will be replaced with question marks.\n";
+ print "\n";
+
+ if ( lc($loosy_encoding) eq 'true' ) {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Enable loosy encoding? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $loosy_encoding = <STDIN>;
+ if ( ( $loosy_encoding =~ /^y\n/i ) || ( ( $loosy_encoding =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $loosy_encoding = 'true';
+ } else {
+ $loosy_encoding = 'false';
+ }
+ return $loosy_encoding;
+}
+
+
# Advanced tree
sub commandB1 {
print "Enable this option if you want to use DHTML based folder listing.\n";
# string
print CF "\$available_languages = '$available_languages';\n";
# boolean
- print CF "\$agresive_decoding = $agresive_decoding;\n";
+ print CF "\$aggressive_decoding = $aggressive_decoding;\n";
+ # boolean
+ print CF "\$loosy_encoding = $loosy_encoding;\n";
print CF "\n";
# string
* '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';
* This options allows displaying native language names in language
* selection box.
* @global bool $show_alternative_names
+ * @since 1.5.0
*/
$show_alternative_names = false;
/**
- * Agresive Decoding Control
+ * Aggressive Decoding Control
*
* This option enables reading of Eastern multibyte encodings.
* Functions that provide this support are very cpu and memory intensive.
* Don't enable this option unless you really need it.
- * @global bool $agresive_decoding
+ * @global bool $aggressive_decoding
+ * @since 1.5.1
*/
-$agresive_decoding = false;
+$aggressive_decoding = false;
+
+/**
+ * Loosy Encoding Control
+ *
+ * This option allows charset conversions when output charset does not support
+ * all symbols used in original charset. Symbols unsupported by output charset
+ * will be replaced with question marks.
+ * @global bool $loosy_encoding
+ * @since 1.5.1
+ */
+$loosy_encoding = false;
/*** Tweaks ***/
/**
*
* Use experimental DHTML folder listing
* @global bool $advanced_tree
+ * @since 1.5.0
*/
$advanced_tree = false;
+
/**
* Older listing way control
*
* @global bool $oldway
*/
$oldway = false;
+
/**
* Message Icons control
*
* Don't enable this option if you are not sure about availability of
* recode support.
* @global bool $use_php_recode
+ * @since 1.5.0
*/
$use_php_recode = false;
+
/**
* PHP iconv functions control
*
* Don't enable this option if you are not sure about availability of
* iconv support.
* @global bool $use_php_iconv
+ * @since 1.5.0
*/
$use_php_iconv = false;
*/
function charset_decode ($charset, $string) {
global $languages, $squirrelmail_language, $default_charset;
- global $use_php_recode, $use_php_iconv, $agresive_decoding;
+ global $use_php_recode, $use_php_iconv, $aggressive_decoding;
if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_decode')) {
$string = htmlspecialchars ($string);
/* controls cpu and memory intensive decoding cycles */
- if (! isset($agresive_decoding) || $agresive_decoding=="" ) {
- $agresive_decoding=false; }
+ if (! isset($aggressive_decoding) || $aggressive_decoding=="" ) {
+ $aggressive_decoding=false; }
$decode=fixcharset($charset);
$decodefile=SM_PATH . 'functions/decode/' . $decode . '.php';
* @return bool is it possible to convert to user's charset
*/
function is_conversion_safe($input_charset) {
- global $languages, $sm_notAlias, $default_charset, $enable_loosy_encoding;
+ global $languages, $sm_notAlias, $default_charset, $loosy_encoding;
- if (isset($enable_loosy_encoding) && $enable_loosy_encoding )
+ if (isset($loosy_encoding) && $loosy_encoding )
return true;
// convert to lower case
'$available_languages' => array( 'name' => _("Available languages"),
'type' => SMOPT_TYPE_STRING,
'size' => 40 ),
- '$agresive_decoding' => array( 'name' => _("Use agresive decoding"),
+ '$aggressive_decoding' => array( 'name' => _("Enable aggressive decoding"),
+ 'type' => SMOPT_TYPE_BOOLEAN ),
+ '$loosy_encoding' => array( 'name' => _("Enable loosy encoding"),
'type' => SMOPT_TYPE_BOOLEAN ),
'Group10' => array( 'name' => _("Tweaks"),
'type' => SMOPT_TYPE_TITLE ),