Commit Graph
11446 Commits
Author SHA1 Message Date
nonamethanks 63bd5daa3b Posts: prune disapprovals on new appeal or flag 2022-04-11 15:54:28 +02:00
evazion 98b313f8de Remove NewRelic integration.
Remove the NewRelic integration in preparation for migrating to Elastic APM instead.
2022-04-11 01:46:30 -05:00
evazion 05261bf6d7 tags: fix backwards deprecate tag links on tag edit page.
Fix the tag edit page getting the `deprecate tag` and `undeprecate tag` BUR links backwards.
2022-04-10 00:13:26 -05:00
evazion 90b800ced7 tags: add index on is_deprecated. 2022-04-10 00:07:15 -05:00
evazion e37f3e6538 Merge pull request #5104 from nonamethanks/no-wiki-no-deprecation
Tags: don't allow deprecation of tags without wiki
2022-04-10 00:05:08 -05:00
evazion 18ffd9bb15 Merge pull request #5105 from nottalulah/patch-3
fix broken assertion in nijie test
2022-04-10 00:00:38 -05:00
evazion b337bf700a Merge pull request #5103 from nonamethanks/gitignore-vendor-root
Add /vendor to .gitignore
2022-04-09 23:59:41 -05:00
evazion 5f0800e053 Merge pull request #5108 from Jadrie/master
Convert GIT paths to https
2022-04-09 23:57:34 -05:00
Jadrie 6e8d5047d5 Convert GIT paths to https
See https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
2022-04-10 00:36:09 -04:00
nonamethanks 11281d6f58 Tags: don't allow deprecation of tags without wiki 2022-04-09 20:16:55 +02:00
Lily 9dde90ef94 fix broken assertion in nijie test 2022-04-09 12:32:45 -03:00
nonamethanks 0c6994f487 Add /vendor to .gitignore
This folder is created by running `bundle install`
2022-04-09 14:54:15 +02:00
evazion a4659b4d09 Merge pull request #5099 from nonamethanks/deprecated-tags
Add ability to mark tags as deprecated
2022-04-09 04:56:43 -05:00
evazion f27a85e879 Merge pull request #5092 from NamelessContributor/issue-5084
Add auto theme preference (fix #5084)
2022-04-09 03:48:39 -05:00
evazion 4f6c947e4e Merge pull request #5097 from NamelessContributor/fix-spoiler-link-tap
css: prevent acidentally opening spoilered links
2022-04-09 03:23:12 -05:00
nonamethanks ea76a889db Add ability to mark tags as deprecated
* Deprecated tags can't be added to posts, but existing deprecated tags
  in a post won't be removed
* Only empty tags can be marked as deprecated manually
* No tags can be manually undeprecated
** These limits don't apply to admins
* Deprecating or undeprecating a tag will create a new mod action to
  prevent people from going rogue
* Added deprecate/undeprecate commands for BURs
* Deprecating a tag via BUR removes all implications to and from it as well
2022-04-08 09:07:14 +02:00
NamelessContributor 91a9153764 css: prevent acidentally opening spoilered links
A small delay on the pointer-events property prevents accidentally
opening a link inside a spoiler when tapping to reveal the spoiler on
mobile.
2022-04-07 11:43:17 +02:00
evazion 98a9b2484b post queries: parse order:*_count synonyms. 2022-04-06 23:57:55 -05:00
evazion 86de5cb5d2 posts: fixup flagger: metatag.
Fix regression in 01a22930e.
2022-04-06 23:57:50 -05:00
evazion 01a22930e7 posts: move attribute search methods from PostQueryBuilder to Post.
Move `status_matches` etc methods from PostQueryBuilder to Post. This is
to make refactoring to use the new query parser easier.
2022-04-06 20:25:09 -05:00
evazion c707190bc1 posts: refactor modules to use concerning. 2022-04-06 20:25:00 -05:00
evazion a4d43ae72a post queries: track whether metatag values are quoted.
This is necessary for the `commentary:` metatag, which has different
behavior depending on whether the metatag value is quoted. For example,
`commentary:translated` finds translated commentaries, while
`commentary:"translated"` finds commentaries containing the literal word
"translated".
2022-04-06 17:20:27 -05:00
evazion 2adc530ba0 post queries: parse count metatag synonyms. 2022-04-06 17:20:27 -05:00
evazion f15f365375 Merge pull request #4952 from thayol/fix-negated-ord
Search: "Fix" negated ordered metatags
2022-04-06 04:43:24 -05:00
evazion 783419bcd7 post queries: support single-quoted strings in metatags. 2022-04-06 00:18:38 -05:00
evazion 88be28ae36 users: optimize commented/noted post count on user profiles.
Count the number of commented and noted posts directly, instead of
indirectly by counting the number of posts in a `commenter:<name>` or
`noteupdater:<name>` search. This is faster because it generates
better SQL.
2022-04-06 00:18:29 -05:00
evazion 71c8768fe2 autocomplete: fix autocomplete not working.
Broken by 7fe7175. PostQuery is no longer normalized by default, so the
AST structure not the same as before, which broke autocomplete.
2022-04-04 18:09:56 -05:00
evazion 7fe717506d post queries: add methods for normalizing queries. 2022-04-04 03:56:56 -05:00
evazion 1957cb354e post queries: add #replace_aliases method. 2022-04-04 03:56:54 -05:00
evazion bf7c721815 post queries: refactor AST #simplify method.
Refactor the `PostQuery::AST#simplify` method to split it into three
methods: `#trim` to eliminate redundant AND and OR clauses, `#simplify`
to expand deeply nested subexpressions, and `#sort` to sort the query
into alphabetical order.

This is so we can normalize queries written by users by parsing and
rewriting them, but without expanding out nested subexpressions, which
can substantially alter the way the query is written.
2022-04-04 00:48:40 -05:00
evazion 8055c4f172 Fix stale site icons.
Fix artist URLs still showing old cached site icons because the URL
didn't change when the file was updated. Use `image_pack_tag` so that
the filename includes the hash, so that the URL changes when the file
changes.
2022-04-03 22:41:50 -05:00
evazion 70c5332be8 artist urls: add index on url column. 2022-04-03 17:08:36 -05:00
NamelessContributor 8ea514ad1c css: add auto theme preference. fixes #5084
This is the new default. Users who previously used the light theme will
be migrated to the auto setting.
2022-04-03 18:05:34 +02:00
NamelessContributor db5918a783 css: rename base/040_colors.css -> scss 2022-04-03 17:39:30 +02:00
evazion 83f5124a5e Fix #5091: Normalize reddit sources. 2022-04-03 03:46:17 -05:00
evazion d96db350f3 pixiv: fix non-www Pixiv urls not being recognized.
Fix non-www Pixiv URLs (e.g. `https://pixiv.net/users/3584828`) URLs not
being recognized by the URL parser.
2022-04-03 03:07:42 -05:00
evazion 8ef72d59c1 artists: allow url_matches param to take multiple urls.
Pass as an array or space-separated string:

* https://danbooru.donmai.us/artists?search[url_matches]=https://www.pixiv.net/en/users/32777+https://www.pixiv.net/en/users/3584828
* https://danbooru.donmai.us/artists?search[url_matches][]=https://www.pixiv.net/en/users/32777&search[url_matches][]=https://www.pixiv.net/en/users/3584828
2022-04-03 02:54:30 -05:00
evazion 0d480eb832 artist urls: stop using normalized_url.
Stop the last remaining uses of the `artist_urls.normalized_url` column.
It's already no longer used by the artist finder. The only remaining
uses were by API users. Those users should use the `url` column instead.
2022-04-02 23:58:01 -05:00
evazion 86e9cf1d05 artist urls: make normalized_url nullable.
Make the normalized_url column nullable in preparation for dropping it.
2022-04-02 23:30:39 -05:00
evazion ca8083465b newgrounds: exclude links to other works in commentary.
Sometimes when a Newgrounds post is part of a set, there is a list of
links to other posts in the set in the artist's commentary. Exclude
these links because they're not really part of the commentary.

Example: https://www.newgrounds.com/art/view/boxofwant/annie-hughes-1 (NSFW)
2022-04-02 23:13:26 -05:00
evazion 6ad7df0ded news updates: fix updates not being visible. 2022-04-02 18:19:50 -05:00
evazion 10e3416c95 related tags: better tag name selector.
Cherry-picked April Fool's day fix.
2022-04-02 18:19:46 -05:00
evazion 6807ed7786 Fix #5077: Images rated "Adult" on Newgrounds no longer upload. 2022-04-02 17:55:29 -05:00
evazion 2543a2b05b posts: remove tag limit from searches. 2022-04-01 22:06:42 -05:00
Thayol e45e42d479 Use longer lines instead of conditional variables (CodeClimate) 2022-03-31 23:38:40 +02:00
Thayol 70c81f7d49 Change local variable instead of passed object 2022-03-31 23:35:22 +02:00
evazion f2cdc5fd73 Update Ruby gems and Yarn packages. 2022-03-31 03:26:47 -05:00
evazion 9c5b60b630 sources: normalize artist urls for ask.fm, ameblo.jp, anidb.net, animenewsnetwork.com 2022-03-31 02:36:17 -05:00
evazion 54cfbf84c6 pawoo: fix www.pawoo.net urls not being normalized to pawoo.net.
Fix artist URLs like https://www.pawoo.net/@01051708 not being normalized to https://pawoo.net/@01051708.
2022-03-31 02:17:51 -05:00
evazion 990d7f6380 instagram: strip '@' from usernames in profile urls. 2022-03-31 02:02:28 -05:00