Commit Graph

8696 Commits

Author SHA1 Message Date
evazion
ec8c427ef3 reports/uploads: remove upload report page. 2020-01-13 12:58:20 -06:00
evazion
85676ddb74 upload limits: refactor deletion confidence calculation. 2020-01-13 12:53:44 -06:00
evazion
0b08f38b8b flags: remove uploader targeting restrictions.
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.
2020-01-13 12:39:16 -06:00
evazion
34c3df78d9 /sitemap.xml: exclude posts that aren't visible. 2020-01-12 23:01:37 -06:00
evazion
3a2c050c91 recommended posts: drop unused PostSets::Recommended class. 2020-01-12 23:01:31 -06:00
evazion
b3eeb170cb explore/posts/intro: remove page.
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.
2020-01-12 23:01:04 -06:00
evazion
12a845de92 explore/posts/popular: refactor post previews. 2020-01-12 23:01:04 -06:00
evazion
74ce866890 explore/posts/viewed: refactor post previews. 2020-01-12 23:01:04 -06:00
evazion
083ce75c10 pools/gallery: refactor post previews. 2020-01-12 23:01:04 -06:00
evazion
76c4ba6f18 artists/show: refactor post previews. 2020-01-12 20:30:16 -06:00
evazion
8ddf7ee716 wiki pages: drop unused wiki page presenter. 2020-01-12 20:13:44 -06:00
evazion
f2269d39a7 wiki_pages/show: fix <meta> description tag.
Use an excerpt of the first paragraph rather than the entire page.
2020-01-12 20:13:44 -06:00
evazion
50c6840be3 wiki_pages/show: refactor post previews.
* Increase number of previews from 4 to 8.
* Eliminate wiki page post set classes.
2020-01-12 20:13:44 -06:00
evazion
40711e1d4f posts/show: refactor parent/child notices.
* 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.
2020-01-12 18:38:38 -06:00
evazion
ed5caba71c /wiki_page_versions: merge page and global listings. 2020-01-12 16:31:24 -06:00
evazion
90b94adee8 /wiki_page_versions/diff: use SetDiff to diff other_names.
Use SetDiff instead of DiffBuilder to generate diffs for wiki page other
names. SetDiff is what we use for artist other names.
2020-01-12 16:31:23 -06:00
evazion
95dd28fc52 /wiki_page_versions/diff: automatically fix comparison order.
Automatically fix it so that we always compare the newer version with
the wiki version, regardless of the order the pages are given in.
2020-01-12 15:28:07 -06:00
evazion
8dc69bef4b views: fix alias and implication list partial when tag is blank.
Fixup for abacc8ebb.
2020-01-12 13:54:29 -06:00
evazion
796efccbf4 Update ruby gems and yarn packages. 2020-01-12 13:13:03 -06:00
evazion
31e41b06ba pools: remove pool element destroy action.
This endpoint was for removing a single post from a pool. This wasn't
used anywhere within Danbooru.
2020-01-12 01:30:04 -06:00
evazion
1a9e4497da /pool_versions: fix is_deleted search option. 2020-01-12 01:23:35 -06:00
evazion
05da264d0d pools: remove pool list dropdown from add to pool dialog.
Autocomplete works better than trying to select the pool from a gigantic
dropdown.
2020-01-12 01:23:35 -06:00
evazion
bebc4694dd pools: remove is_active flag.
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.
2020-01-12 01:23:35 -06:00
evazion
3fce17d8ae upload tags report: fix incorrect column name. 2020-01-12 00:42:23 -06:00
evazion
1e3c97e43b pools: remove recent pools from 'add to pool' dialog. 2020-01-11 20:11:35 -06:00
evazion
abacc8ebb1 views: convert helpers to partials. 2020-01-11 20:01:14 -06:00
evazion
153a8339ab Inherit errors from StandardError instead of Exception. 2020-01-11 19:07:28 -06:00
evazion
aff3d3b18f Fix various rubocop issues. 2020-01-11 19:01:40 -06:00
evazion
bab656a873 config: remove more obsolete or unneeded config options.
Remove more config options that were either unused or that shouldn't
need to be configured by downstream users.
2020-01-11 01:31:29 -06:00
evazion
07a0b0b175 config: eliminate hostnames config option.
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.
2020-01-11 00:59:25 -06:00
evazion
9afce59790 Merge pull request #4253 from BrokenEagle/missing-post-attributes
Fix missing post HTML attributes
2020-01-10 20:24:51 -06:00
evazion
56faf701f3 Merge pull request #4254 from BrokenEagle/copyable-note-number
Move note number to the body so that it can be copied
2020-01-10 20:22:07 -06:00
evazion
793d3414b0 Merge pull request #4255 from BrokenEagle/additional-twitter-hashtag
Add additional Twitter hashtag
2020-01-10 20:06:51 -06:00
evazion
133547781c /pool_versions: fix N+1 query problems. 2020-01-10 19:30:47 -06:00
evazion
afa4a2c985 js: fixup issues with @rails/ujs.
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.
2020-01-10 19:16:27 -06:00
evazion
c50f3da4be Fix #4179: Checkboxes remaining checked after submit on Add Commentary.
Change add commentary to use edit_form_for, which adds
autocomplete="off" to disable autofill in Firefox.
2020-01-10 19:14:11 -06:00
evazion
c86c61c9a4 Fix #4162: Remove browser autocomplete from most inputs. 2020-01-10 16:08:34 -06:00
evazion
cde8ee64e1 Fix #4241: Approving a post then editing tags returns 404.
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.
2020-01-10 12:54:12 -06:00
evazion
3ca4f4f32c posts: convert post edit form to simple form. 2020-01-10 12:08:28 -06:00
BrokenEagle
114637f594 Use more efficient use of regexes for Twitter hashtag normalization 2020-01-10 15:30:54 +00:00
BrokenEagle
2eef73e8fe Add additional Twitter hashtag
- It was mentioned on issue #4047 but was forgotten to be included
2020-01-10 14:52:49 +00:00
evazion
9f4ac4c96a js: replace jquery-ujs with @rails/ujs. 2020-01-09 22:15:18 -06:00
evazion
fc06a2a0f7 posts: fix members not being able to tag posts.
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.
2020-01-09 18:54:03 -06:00
evazion
2cf0e7dcb5 table builder: add default html ids and css classes.
* Add default IDs for <table> tags (ex: <table id="artists-table">).
* Add default CSS classes for <th> and <td> tags (ex: <td class="name-column">).
2020-01-09 17:32:40 -06:00
evazion
d0d3da08e5 views: remove IP addresses from most pages.
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.
2020-01-09 16:55:09 -06:00
BrokenEagle
4a873626c8 Moved note title to the body so that it can be copied
- Adjusted the title text for new notes
- Adjusted the starting dialog sizes to fit the new text
2020-01-09 22:14:01 +00:00
BrokenEagle
6127492361 Fix missing post HTML attributes 2020-01-09 21:15:31 +00:00
evazion
6acff3334e forum: fix exception when searching forum posts by title.
ex: https://danbooru.donmai.us/forum_posts?search[topic_title_matches]=test

The is_deleted field wasn't qualified so it caused an ambiguous column
error when the forum_posts table was joined with the forum_topics table.
2020-01-09 00:15:05 -06:00
evazion
e119524f20 Merge pull request #4247 from BrokenEagle/pool-version-enhancements
Add pool version enhancements
2020-01-08 19:34:25 -06:00
evazion
5a4b24f6a0 pixiv: normalize new profile urls.
ref: https://danbooru.donmai.us/forum_topics/9127?page=290#forum_post_162222
2020-01-08 17:33:55 -06:00