Commit Graph

859 Commits

Author SHA1 Message Date
evazion
d6ca040198 /super_voters: remove in favor of /users?search[is_super_voter]=true search. 2017-05-02 23:15:19 -05:00
Albert Yi
279134c9bb Merge pull request #3009 from evazion/fix-dmails-search
Fix #1868: Dmail search improvements: subject, searchbox
2017-05-01 14:05:22 -07:00
evazion
e10327219d /users/1234.json: include upload_limit/max_upload_limit/favorite_group_count. 2017-04-29 12:26:25 -05:00
evazion
0652b907a9 dmails: inline search form on /dmails page. 2017-04-29 11:50:26 -05:00
Albert Yi
41b245d19d Merge pull request #2998 from evazion/fix-quote-stripping
Fix [quote] stripping for comments, forum post replies.
2017-04-26 12:43:30 -07:00
evazion
869f1610fc comments: use server-side quote-stripping instead of reimplementing in js. 2017-04-24 21:15:47 -05:00
r888888888
ba1399abef desktop mode redirects back to original page 2017-04-24 15:54:04 -07:00
evazion
808fe0411a /notes, /note_versions: fix N+1 queries on note creators, updaters. 2017-04-23 14:59:36 -05:00
evazion
e6d1842545 /notes: default to listing notes, not posts. Remove group_by=post.
The posts listing is replaced by a link to order:note.
2017-04-23 14:59:36 -05:00
r888888888
9718c6e107 fixes to mobile responsive view 2017-04-20 14:29:11 -07:00
evazion
f6fff16e75 /bans: avoid N+1 queries for user, banner.
Avoids an N+1 issue when rendering users with link_to_user.
2017-04-19 17:56:26 -05:00
evazion
06f2ed685e /bans: add reason_matches, expired, order search params. 2017-04-19 17:56:25 -05:00
r888888888
68f057e7ba refactor how artist notes are updated 2017-04-18 17:07:12 -07:00
r888888888
97da8f8647 deprecate tag subscriptions with warnings 2017-04-14 16:00:20 -07:00
r888888888
19b8d41d09 refactor forum notifications for tag changes 2017-04-12 16:43:15 -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
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
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
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
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
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
evazion
0974ef8bd4 iqdbs: raise exception if not configured. 2017-04-05 01:17:04 -05:00
evazion
08867fa84d listbooru: raise exception if not configured. 2017-04-05 01:17:04 -05:00
evazion
086b520dcc archives: raise exception if not configured. 2017-04-05 01:17:03 -05:00
evazion
3f35a9ab64 Handle failure gracefully for unconfigured services. 2017-04-05 01:17:03 -05:00
evazion
70a7f77a48 Post#approve!: signal errors with invalid object instead of exception. 2017-04-03 17:18:32 -05:00
r888888888
87ff449f20 fixes #2951: /post_versions is extremely slow 2017-04-03 15:03:59 -07:00
evazion
1ae5b7ba2f post archives: fix N+1 problem when fetching previous version. 2017-04-03 15:03:26 -07:00
evazion
964197d403 upload tags report: fix N+1 queries issues. 2017-04-03 15:03:26 -07:00
r888888888
c74b1d532a adjust interval for mod queue notice 2017-03-27 15:53:59 -07:00
r888888888
bd3dfc73c0 fix queue for bulk reverts 2017-03-21 17:13:51 -07:00
evazion
935cefd27e API: on error, include backtrace in json response.
Incidentally fixes issue with error responses inside /sources.json not
including the usual `{"success": false}`.
2017-03-16 18:11:43 -05:00
evazion
28bdfce9f6 /sources: add /sources.xml endpoint. 2017-03-16 18:10:30 -05:00
r888888888
da06bee0ab revamp saved search implementation 2017-03-15 15:36:48 -07:00
evazion
d4b9b66c0e post_versions_controller.rb: fix N+1 queries in post, updater.
Rendering the updater name at post_versions/_listing.html:25 caused
this for each post version:

    SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1

PostArchive#diff caused this for each post version:

    SELECT "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT 1
2017-03-02 17:47:20 -06:00
r888888888
5676978096 require membership to see post history 2017-03-01 16:29:00 -08:00
r888888888
12e4a82db3 fix upload tags report 2017-02-28 16:28:58 -08:00
r888888888
7f22baa1bc refactor upload tags report 2017-02-28 15:34:40 -08:00
Albert Yi
458a9692d6 Merge pull request #2864 from r888888888/upload_tags_report
Implement #2863: basic upload tags change report
2017-02-28 15:28:40 -08:00
Albert Yi
3780645cb2 Merge pull request #2897 from evazion/fix-rescue_from
Remove redundant rescue_from calls.
2017-02-27 16:48:44 -08:00
Albert Yi
27a85cd066 Merge pull request #2895 from evazion/fix-modqueue-dtext
modqueue: link tags, optimize sql, use dtext in disapproval reasons.
2017-02-27 16:47:19 -08:00
r888888888
398f58684f Merge branch 'post-archive' 2017-02-27 10:45:13 -08:00
evazion
40092f21ba Remove redundant rescue_from calls.
These are redundant because ApplicationController rescues these exceptions already.
2017-02-25 02:18:16 -06:00
evazion
83915a5d46 modqueue: avoid N+1 queries for disapprovals, uploaders.
Fixes an N+1 queries problem in the /moderator/post/queue view by
prefetching disapprovals and uploaders.

Also the way disapproval messages were previously rendered triggered a bunch
of sql queries for each post:

    SELECT COUNT(*) FROM "post_disapprovals" WHERE "post_disapprovals"."post_id" = $1 [["post_id", 52]]
    SELECT COUNT(*) FROM "post_disapprovals" WHERE "post_disapprovals"."post_id" = $1 AND "post_disapprovals"."reason" = $2  [["post_id", 52], ["reason", "breaks_rules"]]
    SELECT COUNT(*) FROM "post_disapprovals" WHERE "post_disapprovals"."post_id" = $1 AND "post_disapprovals"."reason" = $2  [["post_id", 52], ["reason", "poor_quality"]]
    SELECT COUNT(*) FROM "post_disapprovals" WHERE "post_disapprovals"."post_id" = $1 AND "post_disapprovals"."reason" IN ('disinterest', 'legacy')  [["post_id", 52]]
    SELECT COUNT(*) FROM "post_disapprovals" WHERE "post_disapprovals"."post_id" = $1 AND (message is not null and message <> '')  [["post_id", 52]]
    SELECT "post_disapprovals".* FROM "post_disapprovals" WHERE "post_disapprovals"."post_id" = $1 AND (message is not null and message <> '')  [["post_id", 52]]

This refactors to bring it down to one:

    SELECT "post_disapprovals".* FROM "post_disapprovals" WHERE "post_disapprovals"."post_id" = $1  [["post_id", 52]]
2017-02-24 21:03:14 -06:00
evazion
1400f64338 dmails_controller.rb: convert to strong params. 2017-02-23 22:51:17 -06:00
Albert Yi
5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
r888888888
6c9d5e4f9a remove advertisement code 2017-02-21 13:35:22 -08:00