summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Producers.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-02-21 22:24:47 +0100
committerYorhel <git@yorhel.nl>2009-02-21 22:24:47 +0100
commit203509ffd8fc2fbbd76129d701a6c20110f6050d (patch)
treea6267c49770f3d150c08edf343b6bfe2f451578f /lib/VNDB/Handler/Producers.pm
parent27029f4567c23dd5c11a7efe5a1c92c23e29bb5c (diff)
Small performance improvements: Don't always fetch all columns on dbProducerGet()
Added an 'extended' flag to the 'what' argument, which should be used if more columns are desired.
Diffstat (limited to 'lib/VNDB/Handler/Producers.pm')
-rw-r--r--lib/VNDB/Handler/Producers.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm
index 36b9b1cf..7f43dd78 100644
--- a/lib/VNDB/Handler/Producers.pm
+++ b/lib/VNDB/Handler/Producers.pm
@@ -21,7 +21,7 @@ sub page {
my $p = $self->dbProducerGet(
id => $pid,
- what => 'vn'.($rev ? ' changes' : ''),
+ what => 'vn extended'.($rev ? ' changes' : ''),
$rev ? ( rev => $rev ) : ()
)->[0];
return 404 if !$p->{id};
@@ -31,7 +31,7 @@ sub page {
return if $self->htmlHiddenMessage('p', $p);
if($rev) {
- my $prev = $rev && $rev > 1 && $self->dbProducerGet(id => $pid, rev => $rev-1, what => 'changes')->[0];
+ my $prev = $rev && $rev > 1 && $self->dbProducerGet(id => $pid, rev => $rev-1, what => 'changes extended')->[0];
$self->htmlRevision('p', $prev, $p,
[ type => 'Type', serialize => sub { $self->{producer_types}{$_[0]} } ],
[ name => 'Name (romaji)', diff => 1 ],
@@ -89,7 +89,7 @@ sub page {
sub edit {
my($self, $pid, $rev) = @_;
- my $p = $pid && $self->dbProducerGet(id => $pid, what => 'changes', $rev ? (rev => $rev) : ())->[0];
+ my $p = $pid && $self->dbProducerGet(id => $pid, what => 'changes extended', $rev ? (rev => $rev) : ())->[0];
return 404 if $pid && !$p->{id};
$rev = undef if !$p || $p->{cid} == $p->{latest};
@@ -198,7 +198,7 @@ sub list {
for ($perlist*$c..($perlist*($c+1))-1) {
li;
cssicon 'lang '.$list->[$_]{lang}, $self->{languages}{$list->[$_]{lang}};
- a href => "/p$list->[$_]{id}", $list->[$_]{name};
+ a href => "/p$list->[$_]{id}", title => $list->[$_]{original}, $list->[$_]{name};
end;
}
end;