Commit Graph

1620 Commits

Author SHA1 Message Date
evazion
fc4fa9dc6c Fix #4077: Migrate CurrentUser and safe_mode to use RequestStore. 2019-08-04 10:12:59 -05:00
evazion
692981e964 Fix #4111: Cache custom CSS. 2019-08-01 00:06:18 -05:00
evazion
efc5487dd6 Fix #4109: Censored images leaked in og:image attribute. 2019-07-31 21:47:31 -05:00
Albert Yi
f95bcc7330 move safe_mode from Thread.current to RequestStore 2019-06-26 09:26:20 -07:00
Albert Yi
04edc3f533 update factories + tests 2019-05-10 17:31:07 -07:00
Albert Yi
6612aa1af9 fix unit tests 2019-04-25 18:13:59 -07:00
Albert Yi
8a16e089d2 don't try to parse deviant art urls that lack a deviation id in the url 2019-04-16 14:00:38 -07:00
Albert Yi
6f4ca75bb1 try to handle deivantart images hosted on images-wixmp better 2019-04-16 13:55:26 -07:00
Albert Yi
eb8ce2e955 Revert "eliminate old algorithm for deviant art sources, fix canonical_url on deviantart"
This reverts commit 58ca52b43e.
2019-04-16 13:22:09 -07:00
Albert Yi
58ca52b43e eliminate old algorithm for deviant art sources, fix canonical_url on deviantart 2019-04-12 16:35:41 -07:00
Albert Yi
c051103d35 fixes #4059: Incorrect commentary description from Nicoseiga in some cases 2019-02-25 15:58:07 -08:00
Albert Yi
d8d4a5ae6f refactor nico seiga manga support 2019-02-25 15:53:07 -08:00
Albert Yi
f6a11e6363 remove residual code 2019-02-25 14:46:43 -08:00
Albert Yi
90ce42a537 add support for nico seiga manga (fixes #4060) 2019-02-25 14:44:45 -08:00
Albert Yi
a66d0353d8 include rating and uploader median score in automod events 2019-02-07 15:17:39 -08:00
Albert Yi
e69f201e2c Merge pull request #4056 from r888888888/automod
add csv export helper
2019-02-04 16:03:01 -08:00
Albert Yi
95211bfbfc add csv export helper 2019-01-31 16:37:11 -08:00
Albert Yi
d8aabff77b remove post keeper references 2019-01-31 15:45:06 -08:00
Albert Yi
cb11e96c31 handle recordnotfound errors 2019-01-30 10:58:29 -08:00
Albert Yi
2961be636a add job hook when post is created 2019-01-30 10:54:27 -08:00
Albert Yi
6243925aeb add user job for updating table in dynamodb 2019-01-30 10:37:39 -08:00
Albert Yi
1550538dc1 Tag change notices
This adds a small notice at the bottom of post searches if a single tag search is the target of any tag change request.
2019-01-22 17:22:07 -08:00
evazion
971281949f artist versions: tune url similarity threshold (#4036) 2019-01-13 15:40:36 -06:00
evazion
13dff046f7 pixiv: fix illust id parsing (fixup 8cadef2dd) 2019-01-13 15:02:51 -06:00
evazion
8cadef2dd7 pixiv: fix illust id parsing (fix #4043).
* Tighten up illust id parsing to avoid misparsing ids from
  non-illust urls (sketch urls and novel urls).

* Move id parsing tests from post_test.rb to sources/pixiv_test.rb.

* Drop support for touch.pixiv.net urls. These urls are no longer used
  by Pixiv and aren't present as the source of any posts on Danbooru.
2019-01-13 14:28:51 -06:00
Albert Yi
f33b23d035 add post count estimates for bulk update requests 2019-01-09 15:54:55 -08:00
Albert Yi
844b1a81ba Merge pull request #4039 from evazion/fix-4038
Fix #4038: Attempting to create an IP-ban bans the creator.
2019-01-09 14:47:32 -08:00
Albert Yi
d97622d1bb Merge pull request #4007 from evazion/fix-4004
Fix #4004: Add additional order by metatags for posts
2019-01-09 14:43:15 -08:00
evazion
80f43f9a7c Fix #4038: Attempting to create an IP-ban bans the creator.
* Rename comments.ip_addr to comments.creator_ip_addr.
* Fix belongs_to_creator to not clobber ip_addr field.
2019-01-09 16:20:34 -06:00
Albert Yi
8b0af19f7f fixes #3824: render tag requests dynamically in the forum post
refactoring
2019-01-08 12:57:37 -08:00
evazion
5c54c61d65 Fix #4035: The Related Tag JSON endpoint is returning the wrong information
* Fix /related_tags.json to return a list of tags in the `other_wikis` field.

* Add support for /related_tags.xml.
2019-01-07 13:30:10 -06:00
evazion
04d5b16da7 pixiv: fix failure to upload bad pixiv id images (fix #4031)
Bug: Uploading bad pixiv id images failed because the pixiv strategy
raised a BadIDError exception when the upload service checked for the
ugoira frame data.
2019-01-03 18:01:20 -06:00
evazion
886096b47a BURs: fix remove alias command removing inactive aliases.
Fix the `remove alias` and `remove implication` commands to only remove
active aliases or implications, not pending/deleted/retired ones.
2019-01-03 16:30:39 -06:00
Albert Yi
6f30c99ac3 fix tag alias correction tests
also removes references to distributed memcached servers in tag alias correction
2019-01-02 11:52:35 -08:00
evazion
d393d67a9b aliases/implications: don't destroy removed aliases (#4024). 2018-12-31 17:07:14 -06:00
evazion
b12e8b5058 Fix #4030: Artstation artist_name broken for direct image urls. 2018-12-31 11:45:50 -06:00
evazion
ff62b63bab notes: whitelist the 'mask' css property.
ref: https://danbooru.donmai.us/forum_topics/9127?page=266#forum_post_153530
2018-12-29 12:08:02 -06:00
evazion
0f513d1a1b twitter: include intent url in new artist entries (#4028). 2018-12-27 15:03:11 -06:00
evazion
2129e60b2b pixiv: include stacc url in new artist entries (#4028). 2018-12-27 15:03:11 -06:00
evazion
1f73e60514 sources: add methods for customizing new artist entries.
* Rename `unique_id` to `tag_name`.

* Add `other_names` and `profile_urls` methods that sources can override
  to provide extra names or urls when creating new artist entries.
2018-12-27 15:03:11 -06:00
evazion
2170961f47 artists: improve prefilling of new artist form (#4028)
* When creating an artist by clicking the '?' next to the artist tag in
  the tag list, prefill the new artist form by finding the artist's last
  upload and fetching its source data.

  Previously we filled the urls with the source of the artist's last
  upload, which was wrong because it was usually a direct image URL (#3078).

* Fix the other names field not escaping spaces within names to underscores.

* Fix the other names field being potentially prefilled with duplicate names.
2018-12-27 15:03:11 -06:00
Albert Yi
ca7c56f95f fix: url normalization for non-project artist subdomains (maybe fixes #4021) 2018-12-19 15:19:00 -08:00
Albert Yi
f859f4babc Merge pull request #4019 from lllusion3469/patch-3
#3767: Prioritize md5 check over source download
2018-12-17 10:07:46 -08:00
evazion
8408c0bf80 Fix #3815: Adjust notes positions/sizes after post replacement
Bug: Notes weren't rescaled when the 'final_source' field was given
during replacement.

The cause was that the notes were rescaled after the source was saved,
but saving the source clobbered `image_{width,height}_before_last_save`
inside `rescale_notes`.

Regressed in b0c2ddba.
2018-12-16 13:55:35 -06:00
evazion
c700ea4b5f Fix #4016: Translated tags failing to find some tags.
* Normalize spaces to underscores when saving other names. Preserve case
  since case can be significant.

* Fix WikiPage#other_names_include to search case-insensitively (note:
  this prevents using the index).

* Fix sources to return the raw tags in `#tags` and the normalized tags
  in `#normalized_tags`. The normalized tags are the tags that will be
  matched against other names.
2018-12-16 11:37:57 -06:00
lllusion3469
e21f067fab #3767: Prioritize md5 check over source download
in case both an upload from disk and a source were specified, this caused
an md5 mismatch error to be thrown
2018-12-14 22:23:47 +01:00
Albert Yi
4706cae114 Add user permissions for flagging and for giving user feedback 2018-12-11 17:08:31 -08:00
evazion
4a1f0523a4 search: add comment_count, note_count metatags (#4004).
Add these metatags:

* comment_count
* deleted_comment_count
* active_comment_count
* note_count
* deleted_note_count
* active_note_count
* order:comment_count
* order:deleted_comment_count
* order:active_comment_count
* order:note_count
* order:deleted_note_count
* order:active_note_count
2018-12-11 18:10:20 -06:00
evazion
37b2214472 post_tags_match: replace joins with subqueries.
Refactor various post_tag_match methods to use subqueries instead of joins.

This simplifies things inside PostQueryBuilder, since now we can assume
we're always dealing with a Post relation, rather than some other table
joined with the posts table.
2018-12-11 18:10:20 -06:00
evazion
c75aef38ed set diff: fix obsolete_{added,removed} not including changed items. 2018-12-10 00:17:01 -06:00