X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/050483c4525eb50f57ef5c5c3a33345a5846b4a4..4b431e1f7f87c78282d24fc9690ecb4ae4af34c3:/selfforum-cgi/shared/Posting/_lib.pm?ds=inline diff --git a/selfforum-cgi/shared/Posting/_lib.pm b/selfforum-cgi/shared/Posting/_lib.pm index 82240d5..30a8254 100644 --- a/selfforum-cgi/shared/Posting/_lib.pm +++ b/selfforum-cgi/shared/Posting/_lib.pm @@ -5,7 +5,7 @@ package Posting::_lib; # File: shared/Posting/_lib.pm # # # # Authors: André Malo , 2001-03-03 # -# Frank Schoenmann , 2001-03-13 # +# Frank Schoenmann , 2001-06-02 # # # # Description: Message access interface, time format routines # # # @@ -40,6 +40,7 @@ use base qw(Exporter); hr_time short_hr_time long_hr_time + month get_all_threads create_forum_xml_string @@ -295,7 +296,7 @@ sub parse_xml_file ($) { my $xml = eval { local $SIG{__DIE__}; # CGI::Carp works unreliable ;-( - new XML::DOM::Parser (KeepCDATA => 1) -> parsefile ($file); + new XML::DOM::Parser(KeepCDATA => 1)->parsefile ($file); }; return if ($@); @@ -491,9 +492,9 @@ sub get_all_threads ($$;$) my ($last_thread, $last_message, $dtd, @unids, %threads); local (*FILE, $/); - open FILE, $file or return undef; + open FILE,"< $file" or return; my $xml = join '', ; - close(FILE) or return undef; + close(FILE) or return; if (wantarray) { @@ -704,7 +705,7 @@ sub save_file ($$) ########################### sub hr_time ($) { - my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mail Juni Juli August September Oktober November Dezember)); + my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mai Juni Juli August September Oktober November Dezember)); # ^^^^^^^^ - UTF8 # my (undef, $min, $hour, $day, $mon, $year) = localtime ($_[0]); @@ -719,7 +720,7 @@ sub short_hr_time ($) { } sub long_hr_time ($) { - my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mail Juni Juli August September Oktober November Dezember)); + my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mai Juni Juli August September Oktober November Dezember)); # ^^^^^^^^ - UTF8 # my @wday = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag); @@ -728,9 +729,16 @@ sub long_hr_time ($) { sprintf ('%s, %02d. %s %04d, %02d:%02d:%02d Uhr', $wday[$wday], $day, $month[$mon], $year+1900, $hour, $min, $sek); } +sub month($) { + my @month = (qw(Januar Februar), "M\303\244rz", qw(April Mai Juni Juli August September Oktober November Dezember)); + # ^^^^^^^^ - UTF8 # + + return $month[$_[0]]; +} + # ==================================================== # Modulinitialisierung # ==================================================== # making require happy -1; \ No newline at end of file +1;