From: b Date: Sat, 14 Oct 2023 17:29:34 +0000 (+0000) Subject: more viewer bugfix after further test X-Git-Tag: v1.1.0~30 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=59956147c5a0725f3c5325075b87df14d83b4824;p=ott%2Fbsta more viewer bugfix after further test --- diff --git a/bsta_lib.1.pm b/bsta_lib.1.pm index aebd62a..95f54a6 100644 --- a/bsta_lib.1.pm +++ b/bsta_lib.1.pm @@ -17,12 +17,15 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +# TODO: FQ NBSP ? + package bsta_lib; use strict; #use warnings use utf8; +use Encode ('encode', 'decode'); use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @@ -54,7 +57,8 @@ use botm_common ( 'html_entity_encode_dec', 'merge_url', 'read_header_env', - 'read_data_file', 'write_data_file' + 'read_data_file', 'write_data_file', + 'join_path' ); ###PERL_PATH_SEPARATOR: PATH_SEPARATOR = / @@ -69,6 +73,11 @@ use botm_common ( ###PERL_CGI_TIMER_PATH: CGI_TIMER_PATH = /bsta/timer.js ###PERL_CGI_VIEWER_PATH: CGI_VIEWER_PATH = /bsta/v +###PERL_DATA_PATH: DATA_PATH = /botm/data/bsta/ +###PERL_DATA_DEFAULT_PATH: DATA_DEFAULT_PATH = /botm/data/bsta/default + +###PERL_WWW_INDEX_PATH: WWW_INDEX_PATH = /botm/www/1190/bsta/index.htm + ###PERL_SCHEME: SCHEME = http ###PERL_WEBSITE: WEBSITE = 1190.bicyclesonthemoon.info ###PERL_FAVICON_PATH: FAVICON_PATH = /img/favicon.png @@ -816,8 +825,10 @@ sub print_viewer_page { # my $prev_frame = $frame - 1; my $next_frame = $frame + 1; - my $title = $frame_data->{'title'}; - my $command = $next_frame_data->{'title'}; + my $title = $frame_data->{'title'}; + my $command = ($frame_data->{'command'} ne '') ? + $frame_data->{'command'} : + $next_frame_data->{'title'}; my $access = $context->{'access'}; my $password_ok = $context->{'password_ok'}; @@ -871,6 +882,7 @@ sub print_viewer_page { ); my $show_command = ( $password_ok || + (!$access) || ($frame < $last_frame) || ( ($ong_state >= STATE->{'ready'}) && $context->{'show_command'} @@ -991,10 +1003,10 @@ sub print_viewer_page { $viewer_next_url = merge_url($viewer_next_url, {'query' => $password_query, 'append_query' => 1}); $viewer_last_url = merge_url($viewer_last_url, {'query' => $password_query, 'append_query' => 1}); if ($frame_indirect) { - $frame_url = merge_url($frame_url , {'query' => $password_query, 'append_query' => 1}); + $frame_url = merge_url($frame_url , {'query' => $password_query, 'append_query' => 1}); } if ($nextframe_indirect) { - $frame_url = merge_url($frame_next_url, {'query' => $password_query, 'append_query' => 1}); + $frame_next_url= merge_url($frame_next_url , {'query' => $password_query, 'append_query' => 1}); } } my $_base_url = html_entity_encode_dec($base_url , 1); @@ -1102,7 +1114,7 @@ sub print_viewer_page { print $fh ':'.$timer_m.''; print $fh ':'.$timer_s.']
'."\n"; } - print '>'; + print $fh '>'; if ($show_command_link) { print $fh ''; }