summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-20 14:44:30 +0100
committerYorhel <git@yorhel.nl>2019-12-20 14:44:43 +0100
commite3c79e9cf014208af25259683b4488f00638f101 (patch)
tree8889c926850fcdaa4db88b0ca82c10bfb0548c41 /lib
parent022431c32299aeb359fbdd54ab40e2ef900ee0ef (diff)
ulist: Remove deprecated hide_list user preference
Old VNDB::* code still uses that preference in a few places, that needs to be fixed.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/Auth.pm2
-rw-r--r--lib/VNWeb/HTML.pm5
-rw-r--r--lib/VNWeb/User/Edit.pm5
-rw-r--r--lib/VNWeb/User/List.pm2
4 files changed, 5 insertions, 9 deletions
diff --git a/lib/VNWeb/Auth.pm b/lib/VNWeb/Auth.pm
index 56367397..35587c8d 100644
--- a/lib/VNWeb/Auth.pm
+++ b/lib/VNWeb/Auth.pm
@@ -273,7 +273,7 @@ sub csrfcheck {
# TODO: Measure global usage of the pref() and prefSet() calls to see if this cache is actually necessary.
my @pref_columns = qw/
- email_confirmed skin customcss filter_vn filter_release show_nsfw hide_list notify_dbedit notify_announce
+ email_confirmed skin customcss filter_vn filter_release show_nsfw notify_dbedit notify_announce
vn_list_own vn_list_wish tags_all tags_cont tags_ero tags_tech spoilers traits_sexual
nodistract_can nodistract_noads nodistract_nofancy
/;
diff --git a/lib/VNWeb/HTML.pm b/lib/VNWeb/HTML.pm
index 8dd6ef28..9dad1902 100644
--- a/lib/VNWeb/HTML.pm
+++ b/lib/VNWeb/HTML.pm
@@ -347,10 +347,7 @@ sub _maintabs_ {
t list => "/$id/ulist?vnlist=1", 'list';
t votes => "/$id/ulist?votes=1", 'votes';
t wish => "/$id/ulist?wishlist=1", 'wishlist';
- } if $t eq 'u' && (
- auth->permUsermod || (auth && auth->uid == $o->{id})
- || !($o->{hide_list} // tuwf->dbVali('SELECT hide_list FROM users WHERE id =', \$o->{id}))
- );
+ } if $t eq 'u';
t posts => "/$id/posts", 'posts' if $t eq 'u';
diff --git a/lib/VNWeb/User/Edit.pm b/lib/VNWeb/User/Edit.pm
index e34ef0ba..82e08729 100644
--- a/lib/VNWeb/User/Edit.pm
+++ b/lib/VNWeb/User/Edit.pm
@@ -8,7 +8,6 @@ my $FORM = form_compile in => {
email => { email => 1 },
perm => { uint => 1, func => sub { ($_[0] & ~auth->allPerms) == 0 } },
ign_votes => { anybool => 1 },
- hide_list => { anybool => 1 },
show_nsfw => { anybool => 1 },
traits_sexual => { anybool => 1 },
tags_all => { anybool => 1 },
@@ -51,7 +50,7 @@ sub _getmail {
TUWF::get qr{/$RE{uid}/edit}, sub {
my $u = tuwf->dbRowi(q{
- SELECT id, username, perm, ign_votes, hide_list, show_nsfw, traits_sexual
+ SELECT id, username, perm, ign_votes, show_nsfw, traits_sexual
, tags_all, tags_cont, tags_ero, tags_tech, spoilers, skin, customcss
, nodistract_can, nodistract_noads, nodistract_nofancy, support_can, support_enabled, uniname_can, uniname, pubskin_can, pubskin_enabled
FROM users WHERE id =}, \tuwf->capture('id')
@@ -140,7 +139,7 @@ json_api qr{/u/edit\.json}, $FORM, sub {
$data->{skin} = '' if $data->{skin} eq config->{skin_default};
$data->{uniname} = '' if $data->{uniname} eq $data->{username};
tuwf->dbExeci('UPDATE users SET', { %{$data}{qw/
- hide_list show_nsfw traits_sexual tags_all tags_cont tags_ero tags_tech spoilers skin customcss
+ show_nsfw traits_sexual tags_all tags_cont tags_ero tags_tech spoilers skin customcss
nodistract_noads nodistract_nofancy support_enabled uniname pubskin_enabled
/} },
'WHERE id =', \$data->{id}
diff --git a/lib/VNWeb/User/List.pm b/lib/VNWeb/User/List.pm
index a3245b4c..72da203d 100644
--- a/lib/VNWeb/User/List.pm
+++ b/lib/VNWeb/User/List.pm
@@ -70,7 +70,7 @@ TUWF::get qr{/u/(?<char>[0a-z]|all)}, sub {
);
my $list = tuwf->dbPagei({ results => 50, page => $opt->{p} },
- 'SELECT', sql_user(), ',', sql_totime('registered'), 'as registered, c_vns, c_votes, c_wish, c_changes, c_tags, hide_list
+ 'SELECT', sql_user(), ',', sql_totime('registered'), 'as registered, c_vns, c_votes, c_wish, c_changes, c_tags
FROM users u
WHERE', sql_and('id > 0', @where),
'ORDER BY', {