]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
Make /select purge cache.
[pr0n] / perl / Sesse / pr0n / Common.pm
index 277d699a4a768d1c2584304fe1e6eff1dd690531..d325907b71395e57298499b8718c9f5f8f480a64 100644 (file)
@@ -39,7 +39,7 @@ BEGIN {
                require Sesse::pr0n::Config_local;
        };
 
-       $VERSION     = "v2.70";
+       $VERSION     = "v2.71";
        @ISA         = qw(Exporter);
        @EXPORT      = qw(&error &dberror);
        %EXPORT_TAGS = qw();
@@ -706,7 +706,7 @@ sub ensure_cached {
 
        my $fname = get_disk_location($r, $id);
        if ($infobox ne 'box') {
-               unless (defined($xres) && (!defined($dbwidth) || !defined($dbheight) || $xres < $dbheight || $yres < $dbwidth || $xres == -1)) {
+               unless (defined($xres) && (!defined($dbwidth) || !defined($dbheight) || $xres < $dbwidth || $yres < $dbheight || $xres == -1)) {
                        return ($fname, undef);
                }
        }
@@ -879,7 +879,7 @@ sub make_infobox {
                my ($a, $b) = ($1, $2);
                my $gcd = gcd($a, $b);
                push @classic_fields, [ $a/$gcd . "/" . $b/$gcd . "s", $shutter_priority ];
-       } elsif (defined($info->{'ExposureTime'}) && $info->{'ExposureTime'} =~ /^(\d+(?:\.\d+))$/) {
+       } elsif (defined($info->{'ExposureTime'}) && $info->{'ExposureTime'} =~ /^(\d+(?:\.\d+)?)$/) {
                push @classic_fields, [ $1 . "s", $shutter_priority ];
        }