Commit Graph

9256 Commits

Author SHA1 Message Date
evazion
3aa80c8dc4 Fix #4404: Wrong error message when disapproving an already active post. 2020-04-15 01:18:41 -05:00
evazion
432668ddef Update ruby gems and yarn packages. 2020-04-15 01:18:41 -05:00
evazion
3691404a8d search: fix invalid rating searches returning wrong results.
Partial fix for #4389.

* Fix "rating:asdf" returning all posts.
* Fix "rating:s rating:q" returning results for rating:q.
2020-04-15 01:18:41 -05:00
evazion
be27423afd search: fix invalid username searches returning wrong results.
Partial fix for #4389.

* Fix invalid username searches returning all posts instead of no posts.
* Fix "user:A user:B" returning results for user:B instead of no results.
* Fix "approver:A approver:B" returning results for approver:B instead of no results.
* Add support for negated -commenter, -noter, -noteupdater, -upvote, -downvote metatags.
* Add support for "any" and "none" values for all username metatags,
  including negated metatags that didn't support "any" or "none" before.
* Change noter:any and commenter:any to include posts with deleted notes
  or comments. Note that commenter:<username> already included deleted
  comments before. This is so that commenter:any has the same behavior
  as commenter:<username>
2020-04-15 01:18:41 -05:00
evazion
dc6575dc76 uploads: fix corrupted image detection.
* Fix corrupted image detection. We were shelling out to vips and trying
  to grep for error messages, but the error message for jpeg files changed.
  Now we load the file in ruby vips, which raises an error on failure.

* Don't attempt to redownload corrupted images. If a download completes
  without any errors yet the downloaded file is corrupt, then something is
  wrong at the source and redownloading is unlikely to help. Let the
  upload fail and the user retry if necessary.

* Validate that all uploads are uncorrupted, including files uploaded
  from a computer, not just files uploaded from a source.
2020-04-13 15:30:17 -05:00
evazion
cc31eeafa4 Merge pull request #4401 from lllusion3469/tumblr_2048
tumblr: pick biggest image based on resolution
2020-04-09 23:46:24 -05:00
evazion
04fa913362 Merge pull request #4399 from nonamethanks/master
Post#normalized_source: Normalize more twitter urls
2020-04-09 23:38:49 -05:00
evazion
17abfafe4d Merge pull request #4394 from lllusion3469/fav-vote-buttons
Show or hide post vote buttons when (un)favoriting
2020-04-09 23:34:03 -05:00
evazion
11da2090b5 Merge pull request #4400 from lllusion3469/favgroup-show-deleted
Show deleted posts for favorite groups
2020-04-09 23:25:14 -05:00
lllusion3469
65fb0cf510 tumblr: pick biggest image based on resolution
photo[:alt_sizes] may contain a bigger image than
photo[:original_size]

fixes #4324
2020-04-08 16:42:17 +02:00
nonamethanks
23812aaeb5 Post#normalized_source: Normalize more twitter urls 2020-04-08 13:38:02 +02:00
evazion
c9d5b168e5 ip bans: fix ip addresses with trailing spaces being invalid. 2020-04-07 18:47:51 -05:00
evazion
16011771f1 ip bans: rename ban types to full and partial.
Rename ban types from "normal" and "signup" to "full" and "partial".
2020-04-07 14:59:46 -05:00
evazion
bfdb0a4f5e notes: fix note text vertically overflowing note body.
Can happen when the translator intentionally sets a note body height
that's too small for the note and it causes the note text to overflow.

ref: https://danbooru.donmai.us/forum_topics/9127?page=301#forum_post_164787
2020-04-07 14:16:51 -05:00
evazion
8001272170 gems: remove pry-inline and awesome_print gems.
The current release of pry-inline is broken. Neither of these gems were
that useful anyway.
2020-04-07 14:07:45 -05:00
evazion
b3238c5dbe dtext: fix scrunched table columns.
Fix table columns being collapsed to one character wide in certain
cases. Caused by setting `word-break: break-word` on div.prose, which
was needed to stop very long unbroken strings making columns too wide,
but has the opposite effect of making columns too narrow in other cases.

Example: https://danbooru.donmai.us/forum_topics/13868?page=28#forum_post_164950
2020-04-07 14:05:46 -05:00
lllusion3469
9e8740f746 Show deleted posts for favorite groups
also link to the proper post search with status:any

fixes #4347
2020-04-07 17:16:38 +02:00
lllusion3469
eb564a4ef2 Show or hide post vote buttons when (un)favoriting
When favoriting/unfavoriting a post, it would also be upvoted/"un"voted
but the upvote/downvote/undo vote buttons would stay shown/hidden as
they were before unlike when pressing those buttons.

For example when you want change from favorite to merely upvoted you
would have to reload the page in between.
2020-04-07 02:15:21 +02:00
evazion
6d615001e4 users: add user name blacklist. 2020-04-06 14:13:22 -05:00
evazion
1e0f6f730a uploads: only let users see their own uploads on /uploads listing. 2020-04-06 14:13:22 -05:00
evazion
b2ee1f0766 ip bans: add hit counter, deleted flag, new ban type.
* Make IP bans soft deletable.
* Add a hit counter to track how many times an IP ban has blocked someone.
* Add a last hit timestamp to track when the IP ban last blocked someone.
* Add a new type of IP ban, the signup ban. Signup bans restrict new
  signups from editing anything until they've verified their email
  address.
2020-04-06 14:13:22 -05:00
evazion
98e84d83fb Update ruby gems and yarn packages. 2020-04-06 14:13:22 -05:00
evazion
3fea5858b1 user upgrades: update incentive descriptions.
* Call them hidden tags instead of censored tags so that users don't
  think that buying gold removes censorship from images (yes, this happened).

* Remove API ratelimit information (not relevant to most users).
2020-04-06 14:13:21 -05:00
evazion
8773c7e87f Merge pull request #4369 from BrokenEagle/post-version-fixes
Various post version fixes
2020-04-04 02:55:37 -05:00
evazion
844e8703d8 posts: remove tags from thumbnail alt text. 2020-04-04 02:36:24 -05:00
evazion
dda47f15b0 Merge pull request #4350 from BrokenEagle/fix-relationship-previews
Fix relationship preview alt text overflowing
2020-04-04 02:34:03 -05:00
evazion
56ea6b9ec5 Merge pull request #4387 from BrokenEagle/embedded-note-alignment
Add additional settable attributes for embedded notes alignment
2020-04-04 02:20:24 -05:00
evazion
522c8c219f Merge pull request #4373 from BrokenEagle/note-fixes
Various note fixes
2020-04-04 01:17:32 -05:00
evazion
d8f3ea288d Merge pull request #4376 from BrokenEagle/fix-twitter-video-images
Account for additional Twitter video image links
2020-04-04 01:16:03 -05:00
evazion
a8e7dbac5e Merge pull request #4379 from BrokenEagle/fix-revert-views
Fix artist commentary version view
2020-04-04 01:15:19 -05:00
evazion
743b6f0854 Fix #4377: Save commentary by default.
Remove the "Include artist commentary" checkbox. Commentary is included
by default unless the commentary fields are blank.
2020-04-04 00:46:36 -05:00
evazion
c6354b2504 modqueue: add links to flags, appeals, approvals, deletions in subnav. 2020-04-04 00:13:43 -05:00
evazion
8134e92457 user deletions: fix error when given incorrect password.
Use validations instead of raising an exception when the password is
incorrect so that the controller can display errors sensibly.

Also fix users being logged out even when the deletion attempt failed
due to an incorrect password.
2020-04-03 23:44:23 -05:00
evazion
53b761dfe9 user deletions: fix rename conflict logic.
Remove the 10-try limit when there's a name conflict during renaming. We
forgot to increment the loop counter so this did nothing. This wasn't
necessary anyway since the loop will always terminate eventually because
names have finite length.
2020-04-03 23:44:02 -05:00
evazion
300b8bdefc user deletions: add confirmation dialog. 2020-04-03 23:44:02 -05:00
evazion
52dd8385f8 Fix #4383: Save and display deleted usernames for mods+.
Name changes for deleted users are already visible to mods, so the only
thing we need to do here is to generate a name change before the user is
deleted.
2020-04-03 23:44:02 -05:00
evazion
5826b7a61a Fix #4382: Name change should ask for confirmation. 2020-04-03 23:44:02 -05:00
evazion
6b1d73ddae user name changes: fix permission inconsistencies.
* Let moderators see name changes for deleted users on the user name
  change requests index and show pages. Before they could see name changes
  for deleted users on user profiles, but not on the user name changes index.

* Let members see previous names on profile pages. Before they could see
  previous names on the user name changes index, but not on profile pages
  (ref: #4382).
2020-04-03 23:44:02 -05:00
evazion
14c1dc2f0c users/show: fix stray </tbody> tag.
How the fuck has this been broken for 7 years.
2020-04-03 23:44:02 -05:00
evazion
25cca328b2 Fix #4388: Missing newline in upload form error. 2020-04-03 23:44:02 -05:00
evazion
650c5b779e Fix #4385: Prevent custom CSS softlocks.
Use e.g. https://danbooru.donmai.us/settings?css=false to view a page
with custom css disabled.
2020-04-03 23:44:02 -05:00
evazion
d435795b73 posts: add disapproved:<reason> edit metatag.
* Allow tagging a post with a `disapproved:<disinterest|breaks_rules|poor_quality>` to disapprove it.
* Disallow disapproving active posts.

Fixes #4384.
2020-04-03 23:44:02 -05:00
evazion
fde42022c0 post disapprovals: refactor disapproval reasons.
* Factor out reasons into a constant
* Change column default and eliminate unused `legacy` reason.
2020-04-03 23:44:02 -05:00
BrokenEagle
a4ab165de7 Add alignment attributes for embedded notes
- justify-conent is for L-R alignment
- align-items is for T-B alignment
2020-04-04 02:10:33 +00:00
evazion
3e792019e5 comments: link votes page in subnav for mods. 2020-04-03 15:43:01 -05:00
evazion
dc0442bd17 bans: redirect to index page after creating new ban. 2020-04-03 15:39:14 -05:00
evazion
9312e0c78c comment votes: let mods see comment voters. 2020-04-02 20:47:36 -05:00
evazion
e957fccd7f Update ruby gems and yarn packages. 2020-03-31 21:57:34 -05:00
evazion
34337b0eb5 popular posts: fix exception when given blank date param.
Flexbooru calls this endpoint with a blank date param.
2020-03-31 21:57:34 -05:00
evazion
0aa8e16113 posts: fix exception when searching for "-" or "~". 2020-03-31 21:57:34 -05:00