Remove uses of the is_active flag. Keep column in database (for now).
The only purpose of this flag was to filter out pools from the pool list
in the Add to Pool dialog. This hasn't had much use since autocomplete
was added. Most pools didn't set the flag correctly anyway.
Eliminate the Danbooru.config.hostnames option. It was only used for
rewriting links in notes. Just using the main hostname is good enough,
there aren't any notes still using any of Danbooru's alternate domain
names.
Fix a couple regressions caused by the migration from jquery-ujs to
@rails/ujs in 9f4ac4c96:
* Add authenticity tokens to all remote forms. By default, Rails doesn't
doesn't include authenticity tokens in remote forms because it can cause
problems with fragment caching. This was fine with jquery-ujs because it
would insert the authenticity token when the remote form was
submitted, but apparently @rails/ujs doesn't do this. This broke
certain remote forms nested inside of jquery UI dialogs.
* Fix dialogs to trigger remote form submissions through @rails/ujs
instead of through jquery. This fixes a problem where remote forms that
returned a javascript response displayed the response as plaintext
instead of executing the returned javascript.
This is what happens:
* The post is approved.
* The approval action reloads the page by calling `location.reload()`.
* After the page is reloaded, the value of the hidden `_method` param in
the post edit form is mysteriously overwritten with the value of the
authenticity_token param from the previous page load.
* The post edit form is submitted, but the _method param isn't set to
`patch`, so the form submission is treated as a POST request instead of
a PUT request.
* The POST endpoint doesn't exist, so the form submission returns 404.
The cause appears to be buggy form autofill in Firefox 72. This only
happens in Firefox 72, not in Firefox 68 or in other browsers.
Fix regression caused by 3d3f61559. This is what happened:
* The posts controller calls post.visible? before post.update.
* post.visible? calls post.tag_array.
* The call to tag_array causes the current value of tag_string to be
cached in @tag_array.
* post.update calls post.merge_old_changes.
* post.merge_old_changes accesses tag_array, which contains the old
cached version of tag_string rather than the new version from the
update.
* post.merge_old_changes detects no changes, so the update does nothing.
* This only happens for Members because for Gold+ users the call to
post.visible? short circuits before accessing tag_array.
Moral of the story: cache invalidation is hard. Don't cache unless you have to.
Removed IP addresses from comments and from most other listing pages.
IPs take up a lot of space in many places (especially IPv6 addresses),
and in most of these pages they're rarely useful for catching
sockpuppets.
* Don't link non-artist tags to artist pages, even when the tag has an
artist entry. These artist entries are usually old deleted entries
that happen to have the same name as a gentag, or leftover entries
that need to be deleted.
* URL escape the artist name in /artists/show_or_new?name={name}
Remove the targeted down voting report. This report hasn't been working
for a while. The /post_votes page is a better way to investigate
downvoting activity anyway.
Remove the ssl_options config option. Let nginx handle HSTS and
http->https redirects instead. At the rails level, all we need to do is
set the secure cookie flag when https is enabled (which we assume it's
enabled in production).
Remove links to the aliases and implications pages from the main menu.
Put them in the submenu on the /tags page instead.
These pages are too rarely used to deserve being in the toplevel menu.
They also weren't easy to find for non-Builders. The toplevel menu
shouldn't be dependent on user level.