diff options
-rw-r--r-- | elm/User/Edit.elm | 8 | ||||
-rw-r--r-- | lib/VNWeb/Auth.pm | 2 | ||||
-rw-r--r-- | lib/VNWeb/HTML.pm | 5 | ||||
-rw-r--r-- | lib/VNWeb/User/Edit.pm | 5 | ||||
-rw-r--r-- | lib/VNWeb/User/List.pm | 2 | ||||
-rw-r--r-- | util/sql/schema.sql | 2 |
6 files changed, 6 insertions, 18 deletions
diff --git a/elm/User/Edit.elm b/elm/User/Edit.elm index 47d7d1cb..121e283a 100644 --- a/elm/User/Edit.elm +++ b/elm/User/Edit.elm @@ -52,7 +52,6 @@ type Data | EMail String | Perm Int Bool | IgnVotes Bool - | HideList Bool | ShowNsfw Bool | TraitsSexual Bool | Spoilers Int @@ -76,7 +75,6 @@ updateData msg model = EMail n -> { model | email = n } Perm n b -> { model | perm = if b then or model.perm n else and model.perm (complement n) } IgnVotes n -> { model | ign_votes = n } - HideList b -> { model | hide_list = b } ShowNsfw b -> { model | show_nsfw = b } TraitsSexual b -> { model | traits_sexual = b } Spoilers n -> { model | spoilers = n } @@ -189,12 +187,6 @@ view model = ] ++ (if model.cpass then passform else []) ++ [ tr [ class "newpart" ] [ td [ colspan 2 ] [ text "Preferences" ] ] - , formField "Privacy" - [ label [] - [ inputCheck "" data.hide_list (Set << HideList) - , text " Don't allow others to see my visual novel list, vote list and wishlist and exclude these lists from the database dumps and API." - ] - ] , formField "NSFW" [ label [] [ inputCheck "" data.show_nsfw (Set << ShowNsfw), text " Show NSFW images by default" ] ] , formField "" [ label [] [ inputCheck "" data.traits_sexual (Set << TraitsSexual), text " Show sexual traits by default on character pages" ] ] , formField "Tags" [ label [] [ inputCheck "" data.tags_all (Set << TagsAll), text " Show all tags by default on visual novel pages (don't summarize)" ] ] 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', { diff --git a/util/sql/schema.sql b/util/sql/schema.sql index 93c5953f..d79277f0 100644 --- a/util/sql/schema.sql +++ b/util/sql/schema.sql @@ -760,7 +760,7 @@ CREATE TABLE users ( filter_vn text NOT NULL DEFAULT '', filter_release text NOT NULL DEFAULT '', show_nsfw boolean NOT NULL DEFAULT FALSE, - hide_list boolean NOT NULL DEFAULT FALSE, + hide_list boolean NOT NULL DEFAULT FALSE, -- deprecated, replaced with ulist_labels.private notify_dbedit boolean NOT NULL DEFAULT TRUE, notify_announce boolean NOT NULL DEFAULT FALSE, vn_list_own boolean NOT NULL DEFAULT FALSE, |