]> bicyclesonthemoon.info Git - ott/bsta/blobdiff - info.1.pl
viewer redirects to static page; info includes static page;
[ott/bsta] / info.1.pl
index fc236682bb1728d7aa8d26517e992c4f51cc74b2..d5c0ec8b85e26e84055c736e595f69a758303f4d 100644 (file)
--- a/info.1.pl
+++ b/info.1.pl
@@ -242,11 +242,23 @@ else {
        }
 }
 if (
-       ($info_data{'frame'} eq '') &&
        ($attachment eq '') &&
        ($words eq '')
 ) {
-       $info_data{'frame'} = sprintf($settings{'frame'}, $frame, $info_data{'ext'});
+       if ($info_data{'frame'} eq '') {
+               $info_data{'frame'} = sprintf($settings{'frame'}, $frame, $info_data{'ext'});
+       }
+       if ($info_data{'page'} eq '') {
+               unless (($access) && ($frame < $last_frame)) {
+                       $info_data{'page'} = '';
+               }
+               elsif ($frame == 0) {
+                       $info_data{'page'} = 'index.htm';
+               }
+               else {
+                       $info_data{'page'} = sprintf($settings{'frame'}, $frame, 'htm');
+               }
+       }
 }
 
 print "Content-type: text/plain; charset=UTF-8\n";