X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=d7e673dc98a0fe03b86d4c131ca9f820c4bb6e33;hb=6e87d26481ba152a8504c3c6c8650d1927206331;hp=d5e672746a3b8708777cf51e469fa3c037ee31e4;hpb=de8ae1d729f234ffba9e69e65d4b929b6c0d4256;p=pr0n
diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm
index d5e6727..d7e673d 100644
--- a/perl/Sesse/pr0n/Common.pm
+++ b/perl/Sesse/pr0n/Common.pm
@@ -31,7 +31,7 @@ BEGIN {
require Sesse::pr0n::Config_local;
};
- $VERSION = "v2.05";
+ $VERSION = "v2.10";
@ISA = qw(Exporter);
@EXPORT = qw(&error &dberror);
%EXPORT_TAGS = qw();
@@ -117,10 +117,10 @@ sub scale_aspect {
return ($width, $height);
}
-sub print_link {
- my ($r, $title, $baseurl, $param, $defparam) = @_;
- my $str = "$title";
+ return $str;
+}
+
+sub print_link {
+ my ($r, $title, $baseurl, $param, $defparam) = @_;
+ my $str = "$title";
$r->print($str);
}
@@ -393,7 +397,12 @@ sub make_infobox {
push @lines, "$1-$2-$3 $4:$5";
}
- push @lines, $info->{'Model'} if (defined($info->{'Model'}));
+ if (defined($info->{'Model'})) {
+ my $model = $info->{'Model'};
+ $model =~ s/^\s+//;
+ $model =~ s/\s+$//;
+ push @lines, $model;
+ }
# classic fields
if (defined($info->{'FocalLength'}) && $info->{'FocalLength'} =~ /^(\d+)(?:\.\d+)?(?:mm)?$/) {
@@ -439,9 +448,11 @@ sub make_infobox {
if (defined($info->{'Flash'})) {
if ($info->{'Flash'} =~ /did not fire/i ||
$info->{'Flash'} =~ /no flash/i ||
- $info->{'Flash'} =~ /not fired/i) {
+ $info->{'Flash'} =~ /not fired/i ||
+ $info->{'Flash'} =~ /Off/) {
push @lines, "No flash";
- } elsif ($info->{'Flash'} =~ /fired/i) {
+ } elsif ($info->{'Flash'} =~ /fired/i ||
+ $info->{'Flash'} =~ /On/) {
push @lines, "Flash";
} else {
push @lines, $info->{'Flash'};