X-Git-Url: https://git.distorted.org.uk/~mdw/tgal/blobdiff_plain/20adfd3719d02a5ed7f45030215e899b8096c994..24f4eac3128ad2053a503924519076a2cd342e95:/mason/dhandler
diff --git a/mason/dhandler b/mason/dhandler
index f66b2b3..014f5da 100755
--- a/mason/dhandler
+++ b/mason/dhandler
@@ -110,7 +110,7 @@ Failed to find ‘<% $path |h %>’.
% for my $size (qw{medthumb}) {
% for my $d (@$dd) {
- <& .thumbnail, target => $d->name . "/", comment => $d->comment,
+ <& .thumbnail, target => $d->name, comment => $d->comment,
img => $tn{$d}, size => $size,
caption => $m->interp->apply_escapes($d->name, "h") &>\
% }
@@ -145,11 +145,15 @@ Failed to find ‘<% $path |h %>’.
<%perl>
my ($dir, $base, $ext) = split_path $path;
my $real = join_paths $IMGROOT, $path;
+ my $img = TrivGal::Image->new($path);
+
+ if (defined $scale) { $m->redirect($img->scale($scale)); }
+
my $url = join_paths $IMGURL, $path;
my $realdir = join_paths $IMGROOT, $dir;
my $urldir = join_paths $SCRIPTURL, $dir;
my ($dd, $ff, $ii) = listdir $realdir;
- my $vw = TrivGal::Image->new($path)->scale("view");
+ my $vw = $img->scale("view");
my $fi = undef;
FILE: for (my $i = 0; $i < @$ff; $i++)
@@ -214,6 +218,7 @@ Failed to find ‘<% $path |h %>’.
%
<%args>
$path
+ $scale => undef
%args>
%def>
%
@@ -324,7 +329,7 @@ Failed to find ‘<% $path |h %>’.
elsif (-f $st) { $comp = ".image"; }
else { $comp = ".not-found"; }
$r->header_out("X-AGPL-Source" => $SRCURL);
- $m->comp($comp, path => $path);
+ $m->comp($comp, path => $path, %ARGS);
%init>
%
%###----- That's all, folks -------------------------------------------------