Commit Graph

686 Commits

Author SHA1 Message Date
evazion
c7e6c2a44a posts: fix pixiv id parsing (fixup for 5cf6a43) 2018-11-04 14:22:29 -06:00
Albert Yi
e133a598a3 fixes #3936 2018-10-12 15:17:32 -07:00
evazion
e329764276 Fix #3952: Adding animated_gif tag to a ugoira post breaks the player. 2018-10-10 23:50:36 -05:00
evazion
fdb6e4ecee moebooru: rewrite konachan urls for Post#normalized_source (#3911). 2018-10-06 00:58:22 -05:00
evazion
bd3fb7d70e Post#normalized_source: fix for yande.re urls.
Fix regex for yande.re urls like this:

    https://files.yande.re/image/b66909b940e8d77accab7c9b25aa4dc3/yande.re%20377828.png
2018-10-01 20:03:21 -05:00
Albert Yi
02156f3f34 Merge pull request #3933 from evazion/fix-tag-set-presenter
Optimize tag set presenters
2018-10-01 12:55:05 -07:00
evazion
35eaf28822 Post#fast_count: lower timeout to 1 second. 2018-10-01 12:55:57 -05:00
evazion
ccb57e802c Fix #3934: Post#fast_count has very slow worst case behavior. 2018-10-01 12:55:57 -05:00
evazion
2ae7ec42df Post#fast_count: raise min cache lifetime to 3 minutes (#3925). 2018-10-01 10:38:15 -05:00
evazion
4425150298 Post#fast_count: fix cache expiry not being set (#3925). 2018-10-01 10:38:15 -05:00
evazion
88a177e1d5 TagSetPresenter: refactor humanized_essential_tag_string.
Move Post#humanized_essential_tag_string to TagSetPresenter#humanized_essential_tag_string.

This allows humanized_essential_tag_string to reuse the same set of tags
already fetched by the tag set presenter for the sidebar.

This avoids fetching the tag categories from memcache again (via
Post#typed_tags) when we're already fetched the tags once before.

This also means it's no longer necessary to cache humanized_essential_tag_string
itself in memcache, since it can be generated as quickly as the sidebar taglist.
2018-09-30 21:52:24 -05:00
evazion
2cc4e35cc9 Fix #3930: Can't remove children from a parent post through child: metatag.
Add `child:none` and `-child:123` edit metatags. Allow using ranges with
these metatags (e.g. `-child:1..10`, `child:1,3,5`).
2018-09-29 20:42:38 -05:00
evazion
03abbd0683 Fix #2894: Use [[:space:]] instead of \s in regexes. 2018-09-20 19:24:38 -05:00
Albert Yi
ed5b2ad443 throw error on counts/posts endpoint during a timeout (#2170) 2018-09-19 13:34:50 -07:00
evazion
a0ebd90409 Post#normalized_source: add hitomi.la url normalization. 2018-09-10 20:22:10 -05:00
evazion
6fc2d17886 Post#normalized_source: normalize da urls to new format (#3771) 2018-09-02 11:19:15 -05:00
evazion
4f5cb0ba70 Post#has_artist_tag: fix "artist tag is required" triggering incorrectly.
Fixes the "Artist tag is required" upload warning to only trigger when
the source is from a first-party site.
2018-08-28 18:14:21 -05:00
Albert Yi
68c30961ac Merge pull request #3805 from r888888888/refactor-sources
Refactor sources
2018-08-28 12:13:15 -07:00
evazion
0bb787d987 Post.pending_or_flagged: fix ambiguous column reference.
Fixes an ambiguous column reference error when searching for
`status:unmoderated` on the comments page:

    https://danbooru.donmai.us/comments?group_by=comment&search[post_tags_match]=status:unmoderated

Also removes the `id in (...)` subquery checking whether flagged posts
have a flag from the last week; this is always true.
2018-08-25 11:26:00 -05:00
evazion
e33d6f9e84 Post#is_approvable?: fix 'Approve' link appearing on approver's own uploads.
Fixes the 'Approve' link in the modqueue and in the quickmod bar being
shown as available on the approver's own flagged uploads, even though
they can't actually approve these posts.
2018-08-25 11:12:37 -05:00
Albert Yi
762dc3da24 Refactor sources 2018-08-24 12:10:51 -07:00
evazion
4f02c7f70a search: add status:modqueue, status:unmoderated metatags.
* status:modqueue = ~status:pending ~status:flagged
* status:unmoderated = status:modqueue -user:self -approver:self -disapproval:any
2018-08-23 14:48:39 -05:00
evazion
03a97d2962 Post#normalized_source: add toranoana.jp normalization. 2018-08-21 00:07:58 -05:00
evazion
33506839c4 Post#normalized_source: fix gelbooru source normalization.
Didn't handle https or md5-based subdirs:

    https://gelbooru.com//images/57/a3/57a3676a63e5cf4ab05463a3a9a953bb.jpg
        ^                        ^^^^^
2018-08-20 15:02:08 -05:00
evazion
c504ad555d Fix #3822: Move favorites (while deleting) fails if user has also favorited destination 2018-08-19 00:54:17 -05:00
evazion
3419193341 Post#normalized_source: fix twipple.jp normalization. 2018-08-19 00:33:31 -05:00
evazion
03cf4c917e Post#normalized_source: prefer https links where supported. 2018-08-19 00:31:07 -05:00
evazion
4eead40f4d Fix #3823: Add Photozou source normalization. 2018-08-18 23:23:48 -05:00
Albert Yi
9082ddf455 potential fix for #3783 2018-07-26 18:10:27 -07:00
r888888888
cc7a66438f expose recommended posts to everyone 2018-07-23 15:05:43 -07:00
Albert Yi
ea210bdc75 Add matching storage manager 2018-07-12 17:15:41 -07:00
Albert Yi
64446d49e1 add image cropping support 2018-06-22 14:41:57 -07:00
Albert Yi
e551ff9b0c fix tests 2018-06-20 11:11:46 -07:00
Albert Yi
62218fdb51 move uploader upload count increment from upload to post 2018-06-20 10:43:48 -07:00
Albert Yi
b0c2ddba8b update tests 2018-06-14 17:52:41 -07:00
Albert Yi
b561a6d9ab fixes #3742 2018-06-14 17:10:07 -07:00
Albert Yi
6ad774b939 add more deterministic ordering for post versions 2018-05-25 10:43:03 -07:00
Albert Yi
72f319ccf3 rename lambda references to use shorthand syntax 2018-05-10 11:18:02 -07:00
Albert Yi
1c76e7b5b1 format postkeepermanager jobs in job listing 2018-05-10 09:40:36 -07:00
Albert Yi
99012ff342 fix tests 2018-05-09 11:59:51 -07:00
Albert Yi
3d3bae1228 Merge pull request #3697 from evazion/fix-3696
Fix #3696: API: handle boolean params consistently
2018-05-07 17:35:29 -07:00
evazion
a22bf20230 post tooltips: add header bar with more post info.
Add a header bar containing the following information:

* Uploader + top tagger + upload date
* Score, favorite count, comment count
* Rating
* Source (Pixiv, Twitter, etc)
* Image dimensions

Also list series pools with tags.
2018-05-07 13:18:22 -05:00
evazion
c7492343ce String: add truthy? & falsy? core extensions.
* Add `truthy?` and `falsy?` core extensions to String.

* Use `truthy?` and `falsy?` to replace ad-hoc parsing of boolean
  parameters in various places.
2018-05-03 19:57:14 -05:00
evazion
2f1d185c3e /posts.json: add is_favorited attribute (#3633)
ref: https://github.com/r888888888/danbooru/issues/3633#issuecomment-384863568.
2018-04-27 00:48:53 -05:00
Albert Yi
1c88587c55 fixes null uid field error for #3645 2018-04-16 16:41:46 -07:00
Albert Yi
31a9605ecb fix source mapping for deviantart sources on origin-orig subdomain (fixes #3617) 2018-04-13 11:56:03 -07:00
Albert Yi
32025b77d3 remove fav_string from posts api unless user is moderator (fixes #3633) 2018-04-13 11:45:50 -07:00
evazion
af9a09c2cb Fix #3626: Artist creation page doesn't autocomplete the name anymore. 2018-04-12 16:23:59 -05:00
Albert Yi
b0ac895964 remove unused attr_accessor 2018-04-11 14:09:45 -07:00
Albert Yi
d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00