Commit Graph
5571 Commits
Author SHA1 Message Date
evazion b68cb174f5 tests: fix pixiv tests to use https://i.pixiv.net. 2017-04-15 23:14:41 -05:00
r888888888 6d693799a0 fix trigram index on pools 2017-04-14 16:34:51 -07:00
r888888888 97da8f8647 deprecate tag subscriptions with warnings 2017-04-14 16:00:20 -07:00
r888888888 8b38e4d39a adjust threshold for supervoters for jaccard method 2017-04-14 15:15:20 -07:00
r888888888 f5ea5c36cb fix css for remove alias/implication 2017-04-14 13:23:50 -07:00
r888888888 38a2298de9 disable statement timeout 2017-04-14 13:18:16 -07:00
r888888888 5d7d6eecf8 partial fix for #2751 2017-04-14 13:14:36 -07:00
r888888888 144febc104 remove timestamps 2017-04-14 12:49:41 -07:00
r888888888 621bef3ddf Revert "Merge pull request #2952 from evazion/fix-2950"
This reverts commit ae4509a541197684bfb0538f65afa827854b4335, reversing
changes made to eb008a0e765e231a8fdef594759a61798d6bd1d5.
2017-04-14 12:28:58 -07:00
Albert Yi 81964fa571 Merge pull request #2973 from evazion/test-2972
Test pool metatag not saving bug (#2972).
2017-04-14 11:52:35 -07:00
evazion 9b53d32b4c post_archive_test.rb: exercise pool metatag not saving bug (#2972). 2017-04-14 13:49:54 -05:00
r888888888 76b5031bbf add uniqueness constraint on user names 2017-04-13 18:04:06 -07:00
r888888888 62fde705ce calculate vote similarity using jaccard instead of cosine distance 2017-04-13 14:53:03 -07:00
Albert Yi 602a7795f9 Merge pull request #2971 from evazion/feat-flag-preview
Add dtext preview to flags and appeals
2017-04-13 14:50:28 -07:00
evazion 18a2b2a221 dtext_field: use the field name as the label, not "Body".
For flags and appeals, the reason field should be labeled Reason, not Body.
2017-04-13 15:17:55 -05:00
evazion c90614272a /posts/:id - add dtext preview to flag/appeal dialogs. 2017-04-13 15:17:55 -05:00
r888888888 db4fa8c7da support dynamic updates of forum for bulk update requests 2017-04-12 17:09:09 -07:00
r888888888 cbc886e140 dont scope approver ip addr for tag alias/implication 2017-04-12 16:43:15 -07:00
r888888888 19b8d41d09 refactor forum notifications for tag changes 2017-04-12 16:43:15 -07:00
Albert Yi 441022960a Merge pull request #2968 from evazion/fix-wiki-rename
Fix #2964: prevent renaming wikis with non-empty tags.
2017-04-10 14:53:33 -07:00
evazion 1b572c592c wikis: disallow renaming unless tag is empty (fix #2964). 2017-04-10 16:40:42 -05:00
r888888888 75bca7341b remove status init on artist create 2017-04-10 14:30:34 -07:00
Albert Yi 02302fde2f Merge pull request #2965 from evazion/fix-confirm-approve
Add confirm dialog to sidebar approve/undelete links.
2017-04-10 14:29:24 -07:00
Albert Yi 0a45b99e33 Merge pull request #2966 from evazion/fix-artist-autocomplete
Improve autocomplete on /artists, /wiki_pages, and /pools.
2017-04-10 14:29:05 -07:00
Albert Yi 843f3b783d Merge pull request #2967 from evazion/feat-flags-ui
Improve /post_flags, /post_appeals pages
2017-04-10 14:16:19 -07:00
evazion 8d45bb6d52 /post_{flags,appeals}: allow searching by tags. 2017-04-07 19:37:26 -05:00
evazion f5e22ea235 /post_{flags,appeals}: convert search forms to simple form. 2017-04-07 19:37:26 -05:00
evazion 652e251040 /post_{flags,appeals}: add uploader, approver, flag/appeal count columns.
Also include '»' links next to uploader/approver names for drilling down
the search by a given user.
2017-04-07 19:37:26 -05:00
evazion 3ae8cc5586 post_flags.rb: add 'rejected' and 'deleted' categories.
Includes a category field in /post_flags.json.

Adds 'rejected' and 'deleted' search categories. Categories:

* unapproved - deleted after going unapproved in first three days
* rejected   - deleted after being manually flagged
* deleted    - either of the above
* banned     - artist requested removal
* normal     - none of the above (a "normal" manual flag)
2017-04-07 19:37:26 -05:00
evazion b9693827c3 /wiki_pages: sort autocomplete by post count.
* Add search[order]=post_count param to /wiki_pages.
* Make autocomplete do a prefix match ordered by post count, so that it
  works the same way that tag autocomplete does elsewhere.
2017-04-07 18:25:31 -05:00
evazion 6b462c865e /artists: sort autocomplete by post count.
* Add search[order]=post_count param to /artists.
* Make autocomplete do a prefix match ordered by post count, so that it
  works the same way that tag autocomplete does elsewhere.
2017-04-07 18:25:31 -05:00
evazion fbba167f0c artist.rb: fix ambiguous column references.
Using `search[empty_only]=true` caused certain queries to throw an
exception due to ambiguous column references after joining on the tags
table.

Example:

    https://danbooru.donmai.us/artists?search[empty_only]=true&search[name]=hammer*

    PG::AmbiguousColumn exception raised
    ERROR: column reference "name" is ambiguous LINE 1: ...ags"."name" = "artists"."name" WHERE (true) AND ((name LIKE ... ^
    lib/danbooru/paginator/active_record_extension.rb:108:in `total_count'
    lib/danbooru/paginator/active_record_extension.rb:63:in `block in paginate_numbered'
    lib/danbooru/paginator/active_record_extension.rb:60:in `tap'
    lib/danbooru/paginator/active_record_extension.rb:60:in `paginate_numbered'
    lib/danbooru/paginator/active_record_extension.rb:15:in `paginate'
    app/controllers/artists_controller.rb:41:in `index'
2017-04-07 18:25:31 -05:00
evazion 674028588c /artists: avoid COUNT(*), avoid N+1 queries on artist urls.
* The /artists page issued a `SELECT count(*) FROM artists` because
  .paginate was missing search_count.

* /artists.json had an N+1 problem on artist urls. This slowed down
  autocomplete.
2017-04-07 18:25:30 -05:00
evazion 1a63fd6ac7 /artists: filter deleted artists from autocomplete. 2017-04-07 18:25:30 -05:00
evazion 7f2859eb00 /pools: don't filter inactive pools from autocomplete.
The inactive flag marks series pools that are finished (no more posts
will be added), not pools that are deleted. Finished series should still
be autocompleted.
2017-04-07 18:25:30 -05:00
evazion bb2f0ff795 /pools: make autocomplete use index.
`name ilike ?` doesn't use the index. Use `lower(name) like ?` instead.
2017-04-07 18:25:21 -05:00
evazion 85a39cadf0 /wiki_pages: avoid unnecessary COUNT(*).
@wiki_pages.count issues a COUNT(*), which is unnecessary when we're
just counting the ~20 @wiki_pages we've already loaded.
2017-04-07 18:10:26 -05:00
evazion fcc5521f63 db: add updated_at index on wiki pages.
The wiki pages sidebar is ordered by updated_at. The sidebar is present
on all wiki pages, so this improves load times for all wikis.
2017-04-07 18:10:26 -05:00
evazion 5f6506cbb4 /posts/1234: add confirm dialog to sidebar approve/undelete links. 2017-04-06 22:33:34 -05:00
r888888888 8376c33980 change staging unicorn to use unix socket 2017-04-06 14:01:53 -07:00
Albert Yi f45d8facc3 Merge pull request #2963 from evazion/feat-iqdb-api
Add API support to /iqdb_queries
2017-04-05 17:33:32 -07:00
evazion 2d2efbddfe /iqdb_queries: add api test. 2017-04-05 18:48:57 -05:00
evazion 423dd0b848 /iqdb_queries: include full data for each post in api response. 2017-04-05 18:01:16 -05:00
evazion e15f955677 /iqdb_queries: support json/xml api responses. 2017-04-05 18:01:16 -05:00
evazion c402e15cca /iqdb_queries: support both GET and POST; add GET /posts/1/similar. 2017-04-05 18:01:16 -05:00
r888888888 f2da569978 remove unused controller 2017-04-05 15:59:41 -07:00
r888888888 ae4b73c650 fix jquery dropdown css 2017-04-05 15:32:54 -07:00
Albert Yi 066aaf20c8 Merge pull request #2962 from evazion/fix-services-not-implemented
Fail gracefully when attempting to use unconfigured features (#2954)
2017-04-05 12:35:47 -07:00
Albert Yi 37416cf3a8 Merge pull request #2961 from evazion/fix-move-favs-user-assoc
Fix exception when moving favorites
2017-04-05 12:35:17 -07:00
evazion 0974ef8bd4 iqdbs: raise exception if not configured. 2017-04-05 01:17:04 -05:00