From db99fa0193dc8e0e471eb775a99c6ebca0727e92 Mon Sep 17 00:00:00 2001 From: FAJ-Munich <60485740+FAJ-Munich@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:49:14 +0100 Subject: [PATCH] Hodie et Crastina option for bookmarking purpose + perltidy --- web/cgi-bin/horas/horasscripts.pl | 4 ++-- web/cgi-bin/horas/officium.pl | 3 ++- web/cgi-bin/horas/webdia.pl | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/cgi-bin/horas/horasscripts.pl b/web/cgi-bin/horas/horasscripts.pl index a317e4f0fa6..1d6f2243e97 100644 --- a/web/cgi-bin/horas/horasscripts.pl +++ b/web/cgi-bin/horas/horasscripts.pl @@ -240,8 +240,8 @@ sub psalm : ScriptFunc { my $output = "!$title"; $output .= " [" . ($column == 1 ? ++$psalmnum1 : ++$psalmnum2) . "]" - unless 230 < $psnum && $psnum < 234; # add psalm counter - $output .= "\n!$source" if $source; # add source + unless 230 < $psnum && $psnum < 234; # add psalm counter + $output .= "\n!$source" if $source; # add source $output .= "\n" . join("\n", @lines) . "\n"; $output .= "\&Gloria\n" unless $psnum == 210 || $nogloria; $output =~ s/\$ant/Ant. $antline/g if $psnum == 94; diff --git a/web/cgi-bin/horas/officium.pl b/web/cgi-bin/horas/officium.pl index 5b8fa39cc08..4c1749a2d5f 100755 --- a/web/cgi-bin/horas/officium.pl +++ b/web/cgi-bin/horas/officium.pl @@ -169,7 +169,8 @@ package main; if ($officium eq 'Pofficium.pl') { our $date1 = strictparam('date1'); - if (!$date1) { $date1 = gettoday(); } + if (!$date1 || $date1 eq 'hodie') { $date1 = gettoday(); } + if ($date1 eq 'crastina') { $date1 = prevnext(gettoday(), 1); } if ($command =~ /next/i) { $date1 = prevnext($date1, 1); $command = ''; } if ($command =~ /prev/i) { $date1 = prevnext($date1, -1); $command = ''; } } diff --git a/web/cgi-bin/horas/webdia.pl b/web/cgi-bin/horas/webdia.pl index 44896805447..cfdfbec672e 100644 --- a/web/cgi-bin/horas/webdia.pl +++ b/web/cgi-bin/horas/webdia.pl @@ -308,7 +308,7 @@ sub setfont { my $size = ($istr =~ /^\.*?([0-9\-\+]+)/i) ? $1 : 0; my $color = ($istr =~ /([a-z]+)\s*$/i) ? $1 : ''; if ($istr =~ /(\#[0-9a-f]+)\s*$/i || $istr =~ /([a-z]+)\s*$/i) { $color = $1; } - $color = '' if $color eq 'italic'; # italic is not a color + $color = '' if $color eq 'italic'; # italic is not a color my $font = "