]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Image.pm
Set the default to be infobox + reencoded; add an option to always give
[pr0n] / perl / Sesse / pr0n / Image.pm
index 30bf73647fc4cbaee00cd970ac3f6116aaedea45..6df8ea25e29509a643ef829120f110c59dffea32 100644 (file)
@@ -16,7 +16,7 @@ sub handler {
        # Find the event and file name
        my ($event,$filename,$xres,$yres);
        my $infobox = 1;
-       if ($r->uri =~ m#^/([a-zA-Z0-9-]+)/([a-zA-Z0-9._-]+)$#) {
+       if ($r->uri =~ m#^/([a-zA-Z0-9-]+)/original/([a-zA-Z0-9._-]+)$#) {
                $event = $1;
                $filename = $2;
        } elsif ($r->uri =~ m#^/([a-zA-Z0-9-]+)/(\d+)x(\d+)/(nobox/)?([a-zA-Z0-9._-]+)$#) {
@@ -25,6 +25,12 @@ sub handler {
                $xres = $2;
                $yres = $3;
                $infobox = 0 if (defined($4));
+       } elsif ($r->uri =~ m#^/([a-zA-Z0-9-]+)/(nobox/)?([a-zA-Z0-9._-]+)$#) {
+               $event = $1;
+               $filename = $3;
+               $xres = -1;
+               $yres = -1;
+               $infobox = 0 if (defined($2));
        }
 
        my ($id, $dbwidth, $dbheight);