Commit Graph

2225 Commits

Author SHA1 Message Date
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
bc4010fe6c when PostKeeperManager.check_and_update fails, retry (fixes #3699) 2018-05-09 17:09:20 -07:00
Albert Yi
99012ff342 fix tests 2018-05-09 11:59:51 -07:00
Albert Yi
79ea6f7e6c Add Docker and Travis config files to enable CI tests
Also fixes some Rails 6.0 deprecation warnings
2018-05-09 09:56:38 -07:00
Albert Yi
3b8a1703ff Merge pull request #3701 from evazion/fix-3579
Fix #3579: Add post approval index
2018-05-07 17:36:41 -07:00
Albert Yi
23bef55632 Merge pull request #3700 from evazion/fix-3659
Fix uploads getting stuck in 'processing' state (fix #3659)
2018-05-07 17:36:03 -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
bfecbffb97 post approvals: add to post events page. 2018-05-05 14:00:58 -05:00
evazion
7c1d5e25fb post approvals: add index page + search options (fix #3579). 2018-05-05 14:00:49 -05:00
evazion
c584ca5b19 Fix uploads getting stuck in 'processing' state (fix #3659).
Bug: if an upload timed out while downloading the file, Upload#process!
would catch the error and attempt to retry, but since the upload was
already in the 'processing' state, on the second try `process!` would
bail out immediately and leave the upload stuck in the 'processing' state.

Fix: remove the retry logic from Upload#process!. Let Downloads::File#download!
(which had its own retry logic) handle it instead.
2018-05-05 11:42:40 -05:00
evazion
216d735f24 Fix #3696: API: handle boolean params consistently
* Use ApplicationRecord#attribute_matches to handle boolean attributes
  consistently in search methods.

* Add support for searching various boolean attributes that previously
  weren't supported.
2018-05-03 19:57:14 -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
96669ca4b5 Fix #3694: Favgroup UX issues. 2018-05-03 00:53:42 -05:00
evazion
7e99a1b38b artist commentary form: add partial_commentary checkbox.
Add a checkbox for adding/removing the partial_commentary tag in the
artist commentary form.

ref: https://danbooru.donmai.us/forum_topics/15101.
2018-04-29 22:05:59 -05:00
evazion
a6499b5169 post tooltips: add disable option (#3689).
* Add "disable post tooltips" account setting.
* Add back title attribute for when fancy tooltips are disabled.
2018-04-28 23:50:51 -05:00
r888888888
185d4ef81f split out tag_relationship has_one relationship on forum post to alias/impication (#3686) 2018-04-28 19:28:17 -07:00
r888888888
015aa5abfe fixes #3686 2018-04-28 17:42:39 -07:00
Albert Yi
d4b1782431 allow more forum posts to be voted on (fixes #3677) 2018-04-27 16:18:31 -07:00
Albert Yi
72e7f706df fix scoping bug in dmail 2018-04-27 15:04:27 -07:00
Albert Yi
664a3f02e2 fixes for failed cron maintenance tasks
* update rails scripts for 5.2
* system dmails should be scoped to system
* fix broken url generator in forum notices
2018-04-27 15:01:40 -07: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
f2b525a6d2 Implement forum topic voting and tag change pruning (#3580) 2018-04-26 15:31:06 -07:00
Albert Yi
b0a3f574ed fixes #3574 2018-04-25 14:31:11 -07:00
Albert Yi
f3e62f43ba Merge pull request #3658 from evazion/fix-3657
Fix #3657: Add improvements to the uploads interface
2018-04-20 16:03:39 -07:00
evazion
e6ce05eb29 uploads: add more search options for /uploads listing (#3657). 2018-04-20 15:51:56 -05:00
evazion
909c9aad5a Fix user id cache expiration.
Use a delayed job instead of a HTTP request to invalidate the user id
cache on both servers.
2018-04-19 00:45:51 -05:00
Albert Yi
1c88587c55 fixes null uid field error for #3645 2018-04-16 16:41:46 -07:00
evazion
e49e6f49bb Fix #3641: Can't add tags via Add Commentary dialog. 2018-04-16 12:12:28 -05:00
Albert Yi
f2adbba241 switch postarchive to use belongs_to_updater (fixes #3629) 2018-04-13 12:29:48 -07:00
Albert Yi
06559c4ae4 fix missing urls in artists (fixes #3632) 2018-04-13 12:25:49 -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
76792431be Fix #3636: Tag similarity on autocomplete no longer working. 2018-04-13 00:37:47 -05:00
evazion
af9a09c2cb Fix #3626: Artist creation page doesn't autocomplete the name anymore. 2018-04-12 16:23:59 -05:00
Albert Yi
d747ffc640 fixes #3621 2018-04-12 12:09:33 -07:00
Albert Yi
25f371c8c6 Merge branch 'master' of github.com:r888888888/danbooru 2018-04-12 09:53:02 -07:00
evazion
4233d2149f Fix delete_all / destroy_all calls. 2018-04-11 22:33:11 -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
evazion
40827442c7 Fix #3614: IQDB: don't index placeholder thumbnails. 2018-04-08 12:15:24 -05:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
evazion
e7eee185f7 Fix #3607: Webm / mp4 uploads broken. 2018-04-06 19:55:26 -05:00
evazion
084fcd91ed Only generate tagged filenames for URLs on post show pages (#3597).
Don't generate tagged filenames for urls in the data attributes on
thumbnails, or in the /posts.json api.
2018-04-05 14:20:37 -05:00
evazion
14977397fb Fix "ArgumentError - wrong number of arguments" during tagging. 2018-04-05 13:27:37 -05:00
Albert Yi
b219992b7d add async processing for top tagger 2018-04-03 16:00:36 -07:00
evazion
8fd9d374ca Fix #3583: Copying notes should copy tags to destination. 2018-03-31 12:58:56 -05:00
evazion
8e7ad9eb97 Post#copy_notes_to: wrap in transaction. 2018-03-31 11:44:49 -05:00
evazion
75cc1421a3 Fix #3590: Superfluous space added on certain autocompletions.
Bug: searching for /wiki_pages?search[title]=touhou%20 didn't find the
'touhou' wiki. The space wasn't stripped when the title was normalized.
2018-03-30 22:24:34 -05:00