my $next_available = ($password_ok || ($next_frame <= $last_frame));
my $prefetch_next = (
$password_ok ||
- ($next_frame < $last_frame) || (
+ ($next_frame < $last_frame) || ( # avoid unseen trigger!
($next_frame <= $last_frame) &&
($ong_state >= STATE->{'ready'})
)
)
);
my $show_command_link = ($next_available || (!$access));
- my $show_command_cursor = (($frame == $last_frame) || ($command eq ''));
+ my $show_command_cursor = ((!$next_available) || ($command eq ''));
my $frame_indirect = !(
(!$access) || (
($frame <= $last_frame) &&
($ong_state > STATE->{'inactive'})
)
);
- my $nextframe_indirect = !($next_frame < $last_frame);
+ my $nextframe_indirect = !($next_frame <= $last_frame);
my $password_query;
}}
);
}
- my $frame_file = '';
+ my $frame_file;
my $frame_url;
my $frame_next_url;
my $frame_normal_url;
if ($password_ok) {
$password_query = url_query_encode({'p', $settings->{'password'}});
- $goto_url = merge_url($goto_url , {'query' => $password_query});
- $info_url = merge_url($info_url , {'query' => $password_query});
- $bbcode_url = merge_url($bbcode_url , {'query' => $password_query});
- $viewer_url = merge_url($viewer_url , {'query' => $password_query});
- $viewer_0_url = merge_url($viewer_0_url , {'query' => $password_query});
- $viewer_prev_url = merge_url($viewer_prev_url, {'query' => $password_query});
- $viewer_next_url = merge_url($viewer_next_url, {'query' => $password_query});
- $viewer_last_url = merge_url($viewer_last_url, {'query' => $password_query});
+ $goto_url = merge_url($goto_url , {'query' => $password_query, 'append_query' => 1});
+ $info_url = merge_url($info_url , {'query' => $password_query, 'append_query' => 1});
+ $bbcode_url = merge_url($bbcode_url , {'query' => $password_query, 'append_query' => 1});
+ $viewer_url = merge_url($viewer_url , {'query' => $password_query, 'append_query' => 1});
+ $viewer_0_url = merge_url($viewer_0_url , {'query' => $password_query, 'append_query' => 1});
+ $viewer_prev_url = merge_url($viewer_prev_url, {'query' => $password_query, 'append_query' => 1});
+ $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});
}
}
}
+ # everything determined, now start generating
+
if (ref($file)) {
$fh=$file;
unless (seek($fh, 0, 0)) {