summaryrefslogtreecommitdiff
path: root/lib/VNDB/Func.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-17 14:39:41 +0100
committerYorhel <git@yorhel.nl>2010-12-17 14:48:04 +0100
commit50cfb305796d1d115c408feefbe39fddf7615166 (patch)
treec56da35435063a11b79837dfd8821f6a63719271 /lib/VNDB/Func.pm
parenteaf9e895daab98eb122f2570bb409794b3257c99 (diff)
Don't allow NULL for rr.minage and use -1 for unknown
This can be seen as a partial revert of 0a4f97f0186d6941a4cab2e3bd05201f1fed1441. I used to think using NULL for special values is more "correct" in database terms. But in the end I guess I should be aiming for whatever solution is easier. Both are "correct" in a sense anyway.
Diffstat (limited to 'lib/VNDB/Func.pm')
-rw-r--r--lib/VNDB/Func.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index 65b66f9e..dcec9e8f 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -82,7 +82,7 @@ sub mt {
sub minage {
my($a, $ex) = @_;
- my $str = !defined($a) ? mt '_minage_null' : !$a ? mt '_minage_all' : mt '_minage_age', $a;
+ my $str = $a == -1 ? mt '_minage_null' : !$a ? mt '_minage_all' : mt '_minage_age', $a;
$ex = !defined($a) ? '' : {
0 => 'CERO A',
12 => 'CERO B',