summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Misc
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-11-15 17:04:41 +0100
committerYorhel <git@yorhel.nl>2019-11-15 17:06:23 +0100
commit34a2d37a7bac141aab6b0c815a17ed75d4ef858e (patch)
tree87ec011c9281811019c441e92b66c7b009e70681 /lib/VNWeb/Misc
parent4580ee0776e4e8a32ec99dc0506625a6e061c854 (diff)
Move pubskin fetching responsibility to VNWeb::HTML::framework_
Requiring callers to fetch the right fields and pass it along to framework_() just seems brittle. This implementation requires an extra query but does make an effort to avoid fetching the skin and css when it's not needed.
Diffstat (limited to 'lib/VNWeb/Misc')
-rw-r--r--lib/VNWeb/Misc/History.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNWeb/Misc/History.pm b/lib/VNWeb/Misc/History.pm
index 6c63e73d..d3caf4a9 100644
--- a/lib/VNWeb/Misc/History.pm
+++ b/lib/VNWeb/Misc/History.pm
@@ -176,7 +176,7 @@ TUWF::get qr{/(?:([upvrcsd])([1-9]\d*)/)?hist} => sub {
};
my $obj = !$type ? undef :
- $type eq 'u' ? tuwf->dbRowi('SELECT id, ', sql_user(), ', pubskin_can, pubskin_enabled, customcss, skin FROM users u WHERE id =', \$id) :
+ $type eq 'u' ? tuwf->dbRowi('SELECT id, ', sql_user(), 'FROM users u WHERE id =', \$id) :
$type eq 'p' ? dbitem producers => 'name' :
$type eq 'v' ? dbitem vn => 'title' :
$type eq 'r' ? dbitem releases => 'title' :
@@ -188,7 +188,7 @@ TUWF::get qr{/(?:([upvrcsd])([1-9]\d*)/)?hist} => sub {
$obj->{title} = user_displayname $obj if $type eq 'u';
my $title = $type ? "Edit history of $obj->{title}" : 'Recent changes';
- framework_ title => $title, type => $type, dbobj => $obj, tab => 'hist', $type eq 'u' ? (pubskin => $obj) : (),
+ framework_ title => $title, type => $type, dbobj => $obj, tab => 'hist',
sub {
my $filt;
div_ class => 'mainbox', sub {