Commit Graph
1731 Commits
Author SHA1 Message Date
evazion 798d524e60 Post#tag_match: clean up read_only param.
* Drop /posts?ro=true param (broken).
* Clean up tag_match (rescuing PG::ConnectionBad didn't do anything, we
  just build the query here, we don't run it).
2019-08-16 00:26:00 -05:00
evazion bb157f5d5b models: drop various unused #named methods. 2019-08-15 19:18:19 -05:00
evazion df8391aec0 Make /artists_versions and /artist_commentaries/search visible to all. 2019-08-15 12:51:51 -05:00
evazion 90fa67d4c1 Remove unused terms of service banner.
No longer used, inadvertently hidden in a6233f297e.
2019-08-14 01:46:44 -05:00
evazion d657624a80 Revert "application controller: fix errors in normalize_search."
This reverts commit 28a88cfa85.
2019-08-14 01:46:43 -05:00
evazion dbfd6185f1 posts: fix error on /posts?md5=<does_not_exist>. 2019-08-13 21:30:21 -05:00
evazion 0f98631908 wiki pages: fix error in /wiki_pages/does_not_exist.json 2019-08-13 21:30:21 -05:00
evazion f6b737103a post votes: fix error handling.
* Clean up javascript.
* Return HTTP 422 instead of HTTP 500 on "you have already voted for
  this post" errors.
* In json/xml error responses, return the error message in the `message`
  field, not `reason`.
* In json/xml success responses, return the post itself instead of a
  plain `{ success: true }` object.
2019-08-13 21:30:20 -05:00
evazion 00239c4901 favorites: fix error handling.
* Return HTTP 422 instead of HTTP 500 on "You have already favorited
  this post" errors.

* Log unexpected errors in Ajax requests to the console.
2019-08-13 21:30:20 -05:00
evazion 0a5e04f015 dmail filters: fix uninitialized constant error. 2019-08-13 21:30:20 -05:00
evazion 28a88cfa85 application controller: fix errors in normalize_search.
Fix exceptions in `normalize_search` on e.g. `https://danbooru.donmai.us/users?search=blah`.
Caused when the `search` param is not a hash.
2019-08-13 21:30:20 -05:00
evazion d7fce22ee5 application controller: rescue Post::SearchError.
Raised when a member does a >2 tag search.
2019-08-13 21:30:20 -05:00
evazion e70cae457d application controller: clean up exception handling.
* Simplify code.
* Show backtraces for all users, not just builders.
* Show backtraces only for unexpected server errors (status 5xx), not
  for normal client errors (status 4xx).
* Log expected errors at info level (reduce noise in production logs).
2019-08-13 21:30:20 -05:00
evazion 601e58d5c5 Fix exception in legacy /post/index.xml endpoint.
Fixes intermittent `uninitialized constant LegacyController::Builder` exceptions.
2019-08-12 19:20:33 -05:00
evazion 7316f41d1d Fix #4106: Allow moderators to IP ban subnets. 2019-08-12 02:12:56 -05:00
evazion 18a216c67a Fix #4130: Remove tag alias corrections. 2019-08-10 22:46:49 -05:00
evazion 30401f6599 aliases, implications: fix N+1 query in listing pages. 2019-08-09 00:05:50 -05:00
evazion 4f024d2360 pools/show: fix N+1 query on pool show page.
Fix a N+1 query when fetching posts to render thumbnails. Also adds
support for the `limit` url param on the posts show page.
2019-08-09 00:05:50 -05:00
evazion 48a4f3c26c application controller: catch more common exceptions. 2019-08-08 22:16:39 -05:00
evazion 9a6add9730 newrelic: refactor error logging.
* Factor out New Relic logging to DanbooruLogger class.
* Log all exceptions to New Relic, not just statement timeouts.
2019-08-08 22:16:39 -05:00
evazion 35dfc704bc application controller: fix bad file extension errors.
Fix requests with bad file extensions not always returning errors correctly:

* https://danbooru.donmai.us/posts.jpg
* https://danbooru.donmai.us/posts.blah
* https://danbooru.donmai.us/posts/bad.jpg
* https://danbooru.donmai.us/posts/bad.blah
2019-08-08 22:16:39 -05:00
evazion 8d706f4fd7 session controller: remove dead session[:previous_uri] cookie.
session[:previous_uri] is never set so it's always nil.
2019-08-08 14:00:46 -05:00
evazion 083283906e application controller: remove unused secure_cookies_check. 2019-08-08 14:00:46 -05:00
evazion 06ad1cbbc1 Fix #3685: Bare layout for error pages. 2019-08-05 11:03:10 -05:00
evazion 3b7ab86750 Fix "You are now logged in.." flash message.
The flash message when logging in contained an extra period.
2019-08-05 11:02:40 -05:00
evazion 39bd766b34 Fix #4053: Add disapproval index improvements.
Add search form to /moderator/post/disapprovals.
2019-08-02 22:03:03 -05:00
evazion 692981e964 Fix #4111: Cache custom CSS. 2019-08-01 00:06:18 -05:00
Albert Yi 0a058dd52b fixes #4080: Status code 500 when disapproving through API 2019-05-17 12:09:03 -07:00
Albert Yi a12f6badde add RequestStore gem, support universal only param for api endpoints (fixes #4068) 2019-04-17 12:00:42 -07:00
Albert Yi 33063a72de Add a listing page for post disapprovals (accessible to approvers only) 2019-01-24 16:14:57 -08:00
Albert Yi 17ae357da9 eliminate mixpanel references 2019-01-23 16:37:44 -08:00
evazion a284d3fb4a BURs: allow only pending BURs to be rejected.
Fix it being possible to reject approved BURs, or to re-reject already
rejected BURs.

Rejecting an approved BUR wouldn't revert the aliases/implications, but
it would change the BUR's status to rejected.
2019-01-15 21:20:28 -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 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 372338e0e5 fix: #4022 Gifting someone a gold account shows "You are now a Builder level account." 2018-12-19 15:19:00 -08:00
Albert Yi 4706cae114 Add user permissions for flagging and for giving user feedback 2018-12-11 17:08:31 -08:00
Albert Yi 60cee5f452 Merge pull request #3989 from evazion/fix-3987
Wiki pages: convert other_names column to array (#3987)
2018-11-19 16:23:32 -08:00
Albert Yi 4077c4776c Merge pull request #3986 from r888888888/refactor-saved-searches
Refactor saved searches
2018-11-15 13:44:49 -08:00
evazion 41ff05c121 artists: convert other_names to array (#3987). 2018-11-15 14:31:16 -06:00
Albert Yi 0508b127fd continue refactoring savedsearch 2018-11-15 12:06:13 -08:00
evazion 29fdfc42a4 pools/gallery: allow searching for collection pools (#3992).
Default to showing only series pools when not doing a search. Otherwise,
when doing a search, show both series and collection pools.
2018-11-15 12:22:51 -06:00
evazion 308a5021b4 wiki pages: convert other_names to array (#3987). 2018-11-13 19:18:11 -06:00
evazion b660aeefd7 application record: add array_attribute method.
Add `array_attribute` method that defines helper methods for converting
array attributes to or from strings.
2018-11-13 19:18:11 -06:00
evazion 115ed16a96 pools: store post_ids as array instead of string (fix #3979) 2018-11-08 15:09:31 -06:00
evazion 19b92acabc Fix #3970: Make "Copy all notes" not builder exclusive. 2018-11-04 16:42:55 -06:00
evazion 39374a70d3 posts/show: rename tags params to q in various places.
Fixup for 011a6f1f7.
2018-10-30 11:32:07 -05:00
evazion 705217d337 Fix new dtext shortlinks redirecting to nonexistent pages.
Fix the following dtext shortlinks redirecting to nonexistent pages:

* flag #1
* appeal #1
* mod action #1
* bur #1
2018-10-25 23:00:43 -05:00
Albert Yi 4d07183a1d Merge pull request #3957 from evazion/fix-related-tags
Related tags: build html server-side, eliminate cookies
2018-10-24 17:34:14 -07:00
Albert Yi b999fc86ea mixpanel fixes 2018-10-22 16:54:38 -07:00