Commit Graph

109 Commits

Author SHA1 Message Date
evazion
0df5c0fd2b Replace deprecated update_attributes with update.
https://rubyinrails.com/2019/04/09/rails-6-1-activerecord-deprecates-update-attributes-methods/

DEPRECATION WARNING: update_attributes! is deprecated and will be removed from Rails 6.1 (please, use update! instead)
2019-08-25 20:29:32 -05:00
Albert Yi
5e5e86c383 limit number of synchronous saved search updates 2019-07-02 17:16:33 -07:00
Albert Yi
e58172483b update iqdb after post replacements (#3885) 2018-09-11 12:24:15 -07:00
evazion
6ff70c5002 mod actions: separate account upgrades from promotions (fix #3841) 2018-08-26 11:12:04 -05:00
Albert Yi
2ec9aad320 fixes #3735 2018-06-05 13:23:30 -07: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
89b523bdae Fix #3480: NoMethodError error when adding artist tag to post. 2017-12-30 16:07:52 -06:00
evazion
45cecff1a6 Move with_timeout / without_timeout to ApplicationRecord. 2017-11-26 13:57:52 -06:00
evazion
7034a96048 Purge invalid gentags from tags table (#3390).
Purges gentags with invalid names from the tags table. Addresses #3390
(Searching certain metatags results in an empty paginator) by removing
metatags from the tags table.
2017-11-20 12:47:30 -06:00
BrokenEagle
e312ae3d92 Added fix script to update the correct tagcount for all posts 2017-11-14 17:11:18 -08:00
r888888888
507aa7c641 Merge branch 'master' of github.com:r888888888/danbooru 2017-09-23 13:15:05 -07:00
r888888888
5ad18aef22 implement gestures 2017-09-23 13:14:49 -07:00
r888888888
b9bc536a79 force s3 backup on post replacements if md5 doesn't change (ref #3290) 2017-09-18 11:11:48 -07:00
r888888888
1e413362e3 don't run spam checks on gold account users (ref #3301) 2017-09-15 16:15:32 -07:00
r888888888
2947b25d6e script to remove expunged posts from users' favorites 2017-07-20 15:42:59 -07:00
evazion
caebdef9fd commentaries: trim whitespace from existing commentaries. 2017-06-13 16:42:30 -05:00
r888888888
09ed1ea720 another bug fix for nico seiga artist url normalization 2017-05-31 15:50:40 -07:00
r888888888
6a706a6b90 fix normalization for nico seiga urls 2017-05-31 15:45:28 -07:00
r888888888
216ca06fee fixes #3100 2017-05-30 15:38:01 -07:00
r888888888
76b5031bbf add uniqueness constraint on user names 2017-04-13 18:04:06 -07:00
r888888888
da06bee0ab revamp saved search implementation 2017-03-15 15:36:48 -07:00
r888888888
26267cd238 add fix script for user names 2017-03-06 16:59:24 -08:00
r888888888
f9e2e1c0d7 add script to fix cache counters 2017-01-17 15:54:02 -08:00
r888888888
27f53fa5db add fix script to remove expunged posts from iqdb 2016-05-03 12:30:34 -07:00
r888888888
6d6d00b190 expose voting to non-gold supervoters 2016-03-14 16:52:49 -07:00
r888888888
89794a7ef2 add saved search gallery link, can only view your own saved searches, normalize saved search categories 2015-11-24 16:41:03 -08:00
Toks
2d3b7182bc #2523 Enable categorized saved searches by default 2015-11-13 00:14:08 -05:00
r888888888
0b9aebddb6 fix bug #2469 2015-10-15 16:27:18 -07:00
r888888888
6480864718 fixes #2469 2015-10-15 15:24:24 -07:00
Toks
56c860ac2f #2319 fix rails 4 syntax 2015-08-11 20:30:05 -04:00
Toks
8e17b4936a Fix artist finder for hentai foundry
#2489
2015-08-11 20:28:58 -04:00
r888888888
a9502c0dc2 fixes #2319: Artist search - NicoSeiga - not finding artist entries from partial URLs 2015-08-07 15:19:47 -07:00
r888888888
1abdcb3cf3 fixes #2419 2015-06-30 13:21:39 -07:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
5a8674d342 fix #2239 2015-05-02 11:12:30 -04:00
Toks
699b2b27d1 #2299 add script 2014-12-22 12:03:25 -05:00
Toks
71cd5ce783 fixes #2114 2014-05-29 22:55:35 -04:00
r888888888
fad0ab7c93 fixes #2133 2014-04-16 17:43:34 -07:00
r888888888
36dab73998 iqdb fixes 2014-03-24 15:12:05 -07:00
r888888888
91a0917477 fix iqdb importer 2014-03-24 15:08:00 -07:00
r888888888
1c2aed92d7 iqdb changes 2014-03-24 14:45:28 -07:00
r888888888
16712b7d56 implement iqdb wrapper 2014-03-24 13:22:03 -07:00
r888888888
97dcfa3d2a Fixes #1520 2014-03-17 18:30:42 -07:00
r888888888
131be5a31b fixes #1535 2014-03-17 18:14:44 -07:00
r888888888
26be011bf4 fixes #1520 2014-03-07 18:11:30 -08:00
Toks
259b7fcf0e Add fix for #1141 2014-01-08 15:46:49 -05:00
r888888888
1a70b9fb97 optimize fix for last_commented_at 2014-01-03 17:08:00 -08:00
r888888888
d22830f55c include fix 2014-01-03 17:01:15 -08:00
Toks
060c305317 #1326: Add script to move favorites to parent 2013-12-17 13:13:27 -05:00
Toks
7b4ef406d1 Add fix for #2057 2013-12-15 19:46:51 -05:00