Commit Graph

9034 Commits

Author SHA1 Message Date
evazion
6fecf5db0e BURs: remove old single alias/implication pruning code.
* Rename TagChangeRequestPruner to BulkUpdateRequestPruner.
* Remove old code for pruning individual alias / implication requests.
2020-03-10 21:23:46 -05:00
evazion
be585060f4 BURs: don't add [APPROVED] / [REJECTED] tags to titles. 2020-03-10 21:02:12 -05:00
evazion
0e7632ed8a aliases/implications: remove forum topic updating code.
Remove code for updating forum topics when an alias or implication is
approved or rejected. This code was only used when approving single
alias or implication requests. This is no longer used now that all
alias/implication requests are done through BURs.
2020-03-10 20:55:20 -05:00
evazion
6504d44223 forum: change BUR counts to status labels.
Use pending / approved / rejected status labels in front of the topic
title instead of a BUR count column. This is to make the forum listing
easier to visually scan for resolved vs unresolved topics.

Labels are only added for topics in the Tags category. This is a hack to
avoid labels on megathreads that have had BURs mistakenly attached to them.

[APPROVED] and [REJECTED] labels are stripped from thread titles to make
the titles cleaner. This is a hack until these titles can be fixed.
2020-03-10 20:13:11 -05:00
evazion
134a06722a forum: use icons to indicate sticky/locked/deleted/restricted status. 2020-03-10 19:04:56 -05:00
evazion
0317033d58 Revert "Return the actual sample size used for related tag calculations"
This reverts commit be0bb42ba9.
2020-03-09 22:18:57 -05:00
evazion
cb11d818b1 artist versions: fixup is_active reference. 2020-03-09 14:40:22 -05:00
evazion
f57f2bde08 Update ruby gems. 2020-03-08 23:18:15 -05:00
evazion
5625458f69 users: refactor password reset flow.
The old password reset flow:

* User requests a password reset.
* Danbooru generates a password reset nonce.
* Danbooru emails user a password reset confirmation link.
* User follows link to password reset confirmation page.
* The link contains a nonce authenticating the user.
* User confirms password reset.
* Danbooru resets user's password to a random string.
* Danbooru emails user their new password in plaintext.

The new password reset flow:

* User requests a password reset.
* Danbooru emails user a password reset link.
* User follows link to password edit page.
* The link contains a signed_user_id param authenticating the user.
* User changes their own password.
2020-03-08 23:18:15 -05:00
evazion
f25bace766 users: refactor change password page.
* Fix users being redirected back to the change password page after
  successfully changing their password.
* Move passwords controller out of /maintenance/ namespace.
* Add tests.
2020-03-08 23:18:08 -05:00
evazion
c30ba8d5bc users/edit: fix Advanced settings section being shown by default. 2020-03-08 14:24:38 -05:00
evazion
f2d7e42d89 Merge pull request #4301 from BrokenEagle/forum-topic-bur-indicators
Add BUR counters to forum topics index
2020-03-07 23:04:19 -06:00
evazion
a1ddba4929 Merge pull request #4325 from BrokenEagle/related-tag-enhancements
Related tag enhancements
2020-03-07 22:38:24 -06:00
evazion
de0b8218b5 Merge pull request #4329 from BrokenEagle/update-blacklist-controls
Update blacklist controls
2020-03-07 22:32:47 -06:00
BrokenEagle
ffc57b6cfa Use alternate iterators which have better performance 2020-03-07 08:13:14 +00:00
BrokenEagle
8c1f6020ba Adjust how blacklist classes get added
- Rename class for links as it was a misnomer
2020-03-07 08:13:14 +00:00
BrokenEagle
161e776cf7 Add utility regexp split function for non-whitespace words 2020-03-07 08:13:14 +00:00
BrokenEagle
d1aed303fd Fix blacklist code executing muliple times
- When enabling/disabling all, it was executing on every single blacklist line
- When starting out disabled, it was executing several times
2020-03-07 08:13:13 +00:00
BrokenEagle
d84150b232 Fix posts not being processed by blacklist after post updates
- Blacklisting individual posts was moved into its own function
- Fixed Javascript variables being leaked into the user environment
- Fixed post qTips being orphaned by replacements by destroying them first
- Moved edit form check into post success to avoid repeating post check
2020-03-07 08:13:08 +00:00
evazion
1a2c082b86 search: support negated wildcards in post searches.
* Support negated wildcards in searches (e.g. "holding -holding_*")
* Raise wildcard limit to matching 25 tags regardless of user level.
* Fix wildcards potentially matching empty tags.
* Fix wildcard tags being sorted by post count only, and therefore not
  having a stable ordering when tags have equal post counts.
* Fix sidebar to calculate wildcards tags the same way the search does.
2020-03-06 23:23:38 -06:00
evazion
967d398c8e search: move query parsing code from tag model to post query builder. 2020-03-06 23:23:38 -06:00
evazion
2e0ad42eca pagination: fix page count timeouts not being cached.
Bug: if there was a timeout when calculating the page count, the timeout
wouldn't be cached, so we would hit multiple timeouts trying to
calculate the page count multiple times.
2020-03-06 23:23:38 -06:00
evazion
d344005f8f tag scripts: fix deleted thumbnails being removed.
Fix thumbnails being removed when using tag scripts on deleted thumbnails.
2020-03-06 23:23:38 -06:00
evazion
f4da0a127d artists: add is_deleted and is_banned indexes. 2020-03-06 23:23:38 -06:00
evazion
ddffffb413 artists: factor out artist finder to separate module. 2020-03-06 23:23:38 -06:00
evazion
a271ddcc29 views: reduce font size of Danbooru link in header. 2020-03-06 23:23:34 -06:00
evazion
9960290666 views: reduce font size of footer. 2020-03-06 19:56:53 -06:00
evazion
36f77942c3 views: hide git hash in footer on mobile.
Reduce clutter so footer fits on one line.
2020-03-06 19:56:44 -06:00
evazion
39ad0d2210 settings: rename "disable responsive mode" to "enable desktop mode"
Desktop mode is a better description. Most users don't know what responsive mode means.
2020-03-06 19:37:11 -06:00
evazion
57ba5c59a4 tag_aliases/index: fix tag category search options excluding empty tags.
Fix Tag.search to not filter out empty tags by default. Set the default
in the tags controller instead.

Fixes various search pages, namely aliases/implications/wiki pages, that
rely on Tag.search and that don't expect it to filter tags out by default.
2020-03-06 19:07:17 -06:00
evazion
6d2dd0303f tags/index: fix has_artist search option.
Fix references to artists.is_active. Note that we deliberately use joins
instead of subqueries here for performance reasons.
2020-03-06 18:55:02 -06:00
evazion
c67e6a5bb4 artists/summary: fix links to group members. 2020-03-06 17:25:19 -06:00
evazion
5bc0ab446b models: add deletable concern. 2020-03-06 17:06:29 -06:00
evazion
32bad825e1 tags.scss: remove unused banned tag styling. 2020-03-06 15:14:25 -06:00
evazion
c936a9624c artists/index: fix incorrect page counts for has_tag param.
Bug: using the has_tag param caused the paginator to calculate the wrong
page count.

Caused by the join having a DISTINCT clause in the OFFSET/LIMIT query,
but not in the COUNT(*) query.
2020-03-06 15:10:19 -06:00
evazion
4c11e339bd artists: rename is_active flag to is_deleted.
Rename is_active to is_deleted. This is for better consistency with
other models, and to reduce confusion over what "active" means for
artists. Sometimes users think active is for whether the artist is
actively producing work.
2020-03-06 14:50:21 -06:00
BrokenEagle
a70433e78f Support numeric inputs for the category 2020-03-06 08:10:28 +00:00
BrokenEagle
be0bb42ba9 Return the actual sample size used for related tag calculations
This meant that both functions had to return two separate values,
which need to be destructured by the function calling them. This
isn't so much a huge issue as its more something just to be made
aware of in case either function needs to be used elsewhere.
2020-03-06 08:10:28 +00:00
BrokenEagle
af96d68c0b Add support for using any of the current related tag types
Regardless of category or query. This meant that the category value
had to be passed in as either null or the value itself for both types
of functions. It also fixes an issue where the category wasn't settable
on the pattern matching type.
2020-03-06 08:10:26 +00:00
BrokenEagle
66d2fd7b98 Add limit support for related tags 2020-03-06 08:05:06 +00:00
BrokenEagle
2d669899a4 Add tags overlap field
This information is already available, so there's no extra processing.
To avoid conflicting with the current tags field, it was made into its
own field, and it uses a hash so that values can be quickly looked up.
2020-03-06 08:05:04 +00:00
evazion
49a3538933 pixiv: add support for techorus urls. 2020-03-04 00:00:39 -06:00
evazion
09046783ac pixiv: fix tests. 2020-03-03 23:54:03 -06:00
evazion
f1345a7ecd Fix #4309: Cannot use random=false in /posts search. 2020-03-03 23:01:34 -06:00
evazion
95e11e0ffc Fix #4318: Flags and appeals should reload page. 2020-03-03 23:01:34 -06:00
evazion
266e4054b0 Fix #4293: ArtStation: use 4k images.
Also fixes #4290 (Image replacements: undefined method hostname for nil:NilClass)
2020-03-03 23:01:29 -06:00
evazion
b9939c6356 Fix #4315: Disapproval messages aren't striped of spaces.
Set blank disapproval messages to null to prevent them from showing up
in wildcard searches.
2020-03-03 04:26:39 -06:00
evazion
143bfdfb5b forum: fix mods not being able to lock forum topics. 2020-03-03 03:54:19 -06:00
evazion
c0376ebb51 tags/index: don't show aliases when search matches primary tag.
When searching e.g. "*mask*", don't show "surgical_mask <- medical_mask"
because "*mask*" already matches the primary tag.
2020-03-03 03:34:34 -06:00
evazion
0890963187 Update ruby gems. 2020-03-03 03:25:51 -06:00