Fix favgroups containing post ids that don't exist. Most of these are from
typos or from old expunged posts that weren't properly removed from favgroups.
Remove restrictions against flagging too many posts by the same
uploader. This had problems with preventing legitimate flags in some
cases, particularly with old legacy content. This will be policed
manually instead.
This was an alternate frontpage that contained a list of previews of the
most popular tags. This page was never linked from anywhere and it was
unknown by most users.
* Convert notices from helpers to partials.
* Eliminate PostSets::PostRelationship class in favor of post_sets/posts template.
* Eliminate COUNT(*) queries when calculating the number of child posts.
* Eliminate redundant parent load and parent exists queries.
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.