]> mj.ucw.cz Git - gallery.git/blobdiff - gal2/UCW/Gallery/Web.pm
Gallery2: Clean up remnants of archiving
[gallery.git] / gal2 / UCW / Gallery / Web.pm
index ac333619c9b9e0684f9fb63af800bd7bfe8c8ba0..d2a718ad372d277a644b8b3cc3fced5fe9aa6ba8 100644 (file)
@@ -8,26 +8,14 @@ use UCW::CGI;
 use File::Spec;
 
 my $show_img;
-my $send_archive;
 
 my %args = (
        'i'     => { 'var' => \$show_img, 'check' => '\d+' },
-       'a'     => { 'var' => \$send_archive }
 );
 
 our $meta;
 our $num_photos;
 
-sub new() {
-       if ($send_archive && $CF{'AllowArchives'}) {
-               # FIXME?
-               require UCW::Gallery::Archive;
-               return new UCW::Gallery::Archive($send_archive);
-       } else {
-               return bless {};
-       }
-}
-
 sub error($) {
        print "<p style='color:red'>Bad luck, the script is broken. Sorry.\n<p>$_[0]\n";
        print "</body></html>\n";
@@ -110,7 +98,7 @@ sub show_list() {
                my $annot = UCW::CGI::html_escape($m->{title});
                my $tw = $tm->{w};
                my $th = $tm->{h};
-               my $thumb = $CF{'ThumbUrlPrefix'} . "/$thumb_fmt/$id.jpg";
+               my $thumb = $CF{'ThumbUrlPrefix'} . "$thumb_fmt/$id.jpg";
                my $side_w = $CF{"ThumbW"} + 2*$CF{"InteriorMargin"};
                my $side_h = $CF{"ThumbH"} + 2*$CF{"InteriorMargin"};
                my $box_w = $CF{"LeftW"} + $side_w + $CF{"RightW"};
@@ -121,7 +109,7 @@ sub show_list() {
                my $ol = $CF{'LeftW'} + $CF{'InteriorMargin'} + int(($CF{'ThumbW'} - $tw)/2);
                my $ot = $CF{'TopH'} + $CF{'InteriorMargin'} + int(($CF{'ThumbH'} - $th)/2);
                my $tit = ($annot ne "") ? " title=\"$annot\"" : "";
-               my $url = ($CF{"ImageSubpages"} ? "?i=$id" : $orig);
+               my $url = ($CF{"ImageSubpages"} ? "?i=$idx" : $orig);
                print "<a href='$url'><img src='$thumb' width=$w height=$h alt='$orig'$tit class=ti style='left: ${ol}px; top: ${ot}px'></a>\n";
                print "<img src='$CF{'RightImg'}' width=$CF{'RightW'} height=$side_h alt='' class=tr>\n";
                print "<img src='$CF{'BotImg'}' width=$box_w height=$CF{'BotH'} alt='' class=tb>\n";