]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Common.pm
Bump the version number.
[pr0n] / perl / Sesse / pr0n / Common.pm
index 0b2fa2488f1df4e7e3e463e015d6db0a13a4663e..91b4f48b683340bfc3a8443723989b817911e811 100644 (file)
@@ -31,7 +31,7 @@ BEGIN {
                require Sesse::pr0n::Config_local;
        };
 
-       $VERSION     = "v2.10";
+       $VERSION     = "v2.11";
        @ISA         = qw(Exporter);
        @EXPORT      = qw(&error &dberror);
        %EXPORT_TAGS = qw();
@@ -134,8 +134,12 @@ sub get_query_string {
 }
 
 sub print_link {
-       my ($r, $title, $baseurl, $param, $defparam) = @_;
-       my $str = "<a href=\"$baseurl" . get_query_string($param, $defparam) . "\">$title</a>";
+       my ($r, $title, $baseurl, $param, $defparam, $accesskey) = @_;
+       my $str = "<a href=\"$baseurl" . get_query_string($param, $defparam) . "\"";
+       if (defined($accesskey) && length($accesskey) == 1) {
+               $str .= " accesskey=\"$accesskey\"";
+       }
+       $str .= ">$title</a>";
        $r->print($str);
 }
 
@@ -182,10 +186,10 @@ sub update_width_height {
        # Also find the date taken if appropriate (from the EXIF tag etc.)
        my $info = Image::ExifTool::ImageInfo(get_disk_location($r, $id));
        my $datetime = undef;
-
+                       
        if (defined($info->{'DateTimeOriginal'})) {
                # Parse the date and time over to ISO format
-               if ($info->{'DateTimeOriginal'} =~ /^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/ && $1 > 1990) {
+               if ($info->{'DateTimeOriginal'} =~ /^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)(?:\+\d\d:\d\d)?$/ && $1 > 1990) {
                        $datetime = "$1-$2-$3 $4:$5:$6";
                }
        }