Update of mhonarc/MHonArc/lib
Modified Files:
mhdb.pl
Log Message:
Bug #14813: Hack fix since the defaults for MIME processing is not
empty variables. A boolean variable is saved along with the resource
setting to flag if the defaults have been changed. If the boolean
exists, we know to resave the resource each time. I figure this is
a more efficient solution versus doing hash equivalency checks.
======================================================================
FILE: mhonarc/MHonArc/lib/mhdb.pl
<http://www.mhonarc.org/cgi-bin/viewcvs.cgi/*checkout*/mhonarc/MHonArc/lib/mhdb.pl?rev=2.40>
<http://www.mhonarc.org/cgi-bin/viewcvs.cgi/mhonarc/MHonArc/lib/mhdb.pl.diff?r1=2.39&r2=2.40&diff_format=h>
--- mhdb.pl 8 Jul 2005 06:34:03 -0000 2.39
+++ mhdb.pl 20 Dec 2005 21:28:15 -0000 2.40
@@ -28,4 +28,7 @@
use File::Basename;
+my $_true = "1";
+my $_false = "0";
+
##---------------------------------------------------------------------------
## output_db() spits out the state of mhonarc to a file. This
@@ -90,9 +93,11 @@
print_var($db,'ZoneUD', \%ZoneUD);
-unless ($IsDefault{'CHARSETALIASES'}) {
+unless ($IsDefault{'CHARSETALIASES'} && !$SaveMIMECharsetAliases) {
+ print_var($db,'SaveMIMECharsetAliases', \$_true);
print_var($db,'readmail::MIMECharsetAliases',
\%readmail::MIMECharsetAliases);
}
-unless ($IsDefault{'CHARSETCONVERTERS'}) {
+unless ($IsDefault{'CHARSETCONVERTERS'} && !$SaveMIMECharSetConverters) {
+ print_var($db,'SaveMIMECharSetConverters', \$_true);
print_var($db,'readmail::MIMECharSetConverters',
\%readmail::MIMECharSetConverters);
@@ -100,9 +105,10 @@
\%readmail::MIMECharSetConvertersSrc);
}
-unless ($readmail::TextDefCharset eq 'us-ascii') {
+unless ($readmail::TextDefCharset ne 'us-ascii') {
print_var($db,'readmail::TextDefCharset',
\$readmail::TextDefCharset);
}
-unless ($IsDefault{'TEXTENCODE'}) {
+unless ($IsDefault{'TEXTENCODE'} && !$SaveTextEncode) {
+ print_var($db,'SaveTextEncode', \$_true);
print_var($db,'readmail::TextEncode',
\$readmail::TextEncode);
@@ -112,5 +118,6 @@
\$readmail::TextEncode);
}
-unless ($IsDefault{'MIMEDECODERS'}) {
+unless ($IsDefault{'MIMEDECODERS'} && !$SaveMIMEDecoders) {
+ print_var($db,'SaveMIMEDecoders', \$_true);
print_var($db,'readmail::MIMEDecoders',
\%readmail::MIMEDecoders);
@@ -118,5 +125,6 @@
\%readmail::MIMEDecodersSrc);
}
-unless ($IsDefault{'MIMEFILTERS'}) {
+unless ($IsDefault{'MIMEFILTERS'} && !$SaveMIMEFilters) {
+ print_var($db,'SaveMIMEFilters', \$_true);
print_var($db,'readmail::MIMEFilters',
\%readmail::MIMEFilters);
@@ -124,7 +132,9 @@
\%readmail::MIMEFiltersSrc);
}
-print_var($db,'readmail::MIMEFiltersArgs',
- \%readmail::MIMEFiltersArgs)
- unless $IsDefault{'MIMEARGS'};
+unless ($IsDefault{'MIMEARGS'} && !$SaveMIMEFiltersArgs) {
+ print_var($db,'SaveMIMEFiltersArgs', \$_true);
+ print_var($db,'readmail::MIMEFiltersArgs',
+ \%readmail::MIMEFiltersArgs);
+}
if (%readmail::MIMEExcs) {
print_var($db,'readmail::MIMEExcs',
@@ -137,5 +147,6 @@
unless $IsDefault{'MIMEINCS'};
}
-unless ($IsDefault{'MIMEALTPREFS'}) {
+unless ($IsDefault{'MIMEALTPREFS'} && !$SaveMIMEAltPrefs) {
+ print_var($db,'SaveMIMEAltPrefs', \$_true);
print_var($db,'MIMEAltPrefs',
\(_at_)MIMEAltPrefs);
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-COMMITS