summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/Message/ToHTML.pm
diff options
context:
space:
mode:
authortmu <tmu>2004-06-11 15:12:39 +0000
committertmu <tmu>2004-06-11 15:12:39 +0000
commita053dca09f8e62e83feba6997cd35de57e578e3f (patch)
tree99382e3575e32ec75bd205e33d8d540000ddbdf1 /fml/lib/Mail/Message/ToHTML.pm
parente5d3fa5a2c281e7687b3003aa9c7c255a44ea960 (diff)
downloadfml8-a053dca09f8e62e83feba6997cd35de57e578e3f.tar.gz
fml8-a053dca09f8e62e83feba6997cd35de57e578e3f.tar.bz2
fml8-a053dca09f8e62e83feba6997cd35de57e578e3f.zip
select index files using @indexs
Diffstat (limited to 'fml/lib/Mail/Message/ToHTML.pm')
-rw-r--r--fml/lib/Mail/Message/ToHTML.pm45
1 files changed, 29 insertions, 16 deletions
diff --git a/fml/lib/Mail/Message/ToHTML.pm b/fml/lib/Mail/Message/ToHTML.pm
index 942028a7..6f59901a 100644
--- a/fml/lib/Mail/Message/ToHTML.pm
+++ b/fml/lib/Mail/Message/ToHTML.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: ToHTML.pm,v 1.65 2004/03/24 01:32:04 fukachan Exp $
+# $FML: ToHTML.pm,v 1.66 2004/06/11 10:35:22 tmu Exp $
#
package Mail::Message::ToHTML;
@@ -17,7 +17,7 @@ my $debug = 0;
my $URL =
"<A HREF=\"http://www.fml.org/software/\">Mail::Message::ToHTML</A>";
-my $version = q$FML: ToHTML.pm,v 1.65 2004/03/24 01:32:04 fukachan Exp $;
+my $version = q$FML: ToHTML.pm,v 1.66 2004/06/11 10:35:22 tmu Exp $;
my $versionid = 0;
if ($version =~ /,v\s+([\d\.]+)\s+/) {
$versionid = "$1";
@@ -777,6 +777,8 @@ sub _format_safe_header
}
+my @indexs = qw(all thread month top);
+
# Descriptions: show link to indexes as navigation
# Arguments: HASH_REF($args)
# Side Effects: none
@@ -786,13 +788,14 @@ sub _format_index_navigator
my ($args) = @_;
my $use_subdir = defined $args->{use_subdir} ? $args->{use_subdir} : 0;
my $prefix = $use_subdir ? '../' : '';
+ my $str;
- my $str = qq{
-<A HREF=\"${prefix}index_all.html\">[ID Index]</A>
-<A HREF=\"${prefix}thread.html\">[Thread Index]</A>
-<A HREF=\"${prefix}monthly_index.html\">[Monthly ID Index]</A>
-<A HREF=\"${prefix}index.html\">[Top Index]</A>
-};
+ for my $index (@$indexs) {
+ $str .= qq{<A HREF=\"${prefix}index_all.html\">[ID Index]</A>\n} if($index eq "all");
+ $str .= qq{<A HREF=\"${prefix}thread.html\">[Thread Index]</A>\n} if($index eq "thread");
+ $str .= qq{<A HREF=\"${prefix}monthly_index.html\">[Monthly ID Index]</A>\n} if($index eq "month");
+ $str .= qq{<A HREF=\"${prefix}index.html\">[Top Index]</A>\n} if($index eq "top");
+ };
return $str;
}
@@ -2197,17 +2200,27 @@ sub htmlify_file
_PRINT_DEBUG("-- msg_html_links");
$html->update_msg_html_links( $id );
- _PRINT_DEBUG("-- monthly id index");
- $html->update_monthly_id_index({ id => $id });
+ for my $index (@$indexs) {
+ if($index eq "month") {
+ _PRINT_DEBUG("-- monthly id index");
+ $html->update_monthly_id_index({ id => $id });
+ }
- _PRINT_DEBUG("-- id index");
- $html->update_id_index({ id => $id });
+ if($index eq "all") {
+ _PRINT_DEBUG("-- id index");
+ $html->update_id_index({ id => $id });
+ }
- _PRINT_DEBUG("-- thread index");
- $html->update_thread_index({ id => $id });
+ if($index eq "thread") {
+ _PRINT_DEBUG("-- thread index");
+ $html->update_thread_index({ id => $id });
+ }
- _PRINT_DEBUG("-- top index");
- $html->create_top_index();
+ if($index eq "top") {
+ _PRINT_DEBUG("-- top index");
+ $html->create_top_index();
+ }
+ }
# no more action for old files
if ($html->is_ignore($id)) {