Commit Graph
69 Commits
Author SHA1 Message Date
evazion a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00
evazion 07e23204b6 rubocop: fix various Rubocop warnings. 2021-06-17 04:17:53 -05:00
evazion 60ff2ae929 models: rename post/pool archives to post/pool versions. 2020-02-15 06:52:10 -06:00
evazion 309821bf73 rubocop: fix various style issues. 2019-12-22 21:23:37 -06:00
evazion a2ea2a65a1 db: drop IP addresses from certain tables.
Don't track IP addresses for post appeals, post flags, tag aliases, tag
implications, or user feedbacks. These things are already tightly
limited. We don't need IPs from them to detect sockpuppets.
2019-11-17 02:45:28 -06:00
evazion a1b48f5e3f views: migrate search forms to use simple form.
Migrate various forms to be built using simple form instead of raw html.
Also adds autocomplete="off" to these forms (#4162).
2019-09-10 14:33:18 -05:00
evazion dab43d96c9 jobs: migrate mass updates to ActiveJob.
Also fixes a bug where mod actions weren't logged on mass updates.
Creating the mod action silently failed because it was called when
CurrentUser wasn' set.
2019-08-19 00:46:31 -05:00
evazion 576b4feb3b views: convert mod dashboard + admin user edit page to simple form.
Fixes bug with the user level select dropdown on the mod dashboard page
missing the builder level.
2019-08-18 11:24:42 -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
Albert Yi f33b23d035 add post count estimates for bulk update requests 2019-01-09 15:54:55 -08:00
evazion 80f43f9a7c Fix #4038: Attempting to create an IP-ban bans the creator.
* Rename comments.ip_addr to comments.creator_ip_addr.
* Fix belongs_to_creator to not clobber ip_addr field.
2019-01-09 16:20:34 -06:00
Albert Yi fe612908cd add creator_ip_addr field to user feedback 2018-11-29 16:51:46 -08:00
Albert Yi 9e1e73ec4c migrate blacklists during mass updates (#2251) 2018-09-19 16:25:06 -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
BrokenEagle 3c45273694 Add category for mod actions 2018-01-13 20:55:52 -08:00
Albert Yi 5da62eff8d Merge branch 'master' into fix-3278 2017-12-13 14:30:08 -08:00
evazion 5819afced7 Fix #3412: Mass updates incorrectly move saved searches. 2017-12-06 14:46:12 -06:00
evazion 45cecff1a6 Move with_timeout / without_timeout to ApplicationRecord. 2017-11-26 13:57:52 -06:00
evazion 88d14b30ed mass updates: log modaction after update successfully completes. 2017-05-28 11:56:44 -05:00
evazion c1a8800bf8 mass updates: fix exception when moving saved searches. 2017-05-28 11:55:05 -05:00
evazion d1d0fe9bc5 /moderator/dashboard: optimize sql queries
* Converts queries to use active record instead of raw sql. This ensures
  that user objects are loaded by rails in the join, so that we
  don't have to issue `User.find` calls to load users one-by-one.

* Use `.includes` to preload associations used in the view, to avoid
  additional N+1 query problems (primarily, calls to link_to_user
  also causing users to be loaded one-by-one).
2017-03-23 04:05:05 -05:00
evazion 2aa3f9ceba /moderator/dashboard: fix exception when PostArchive isn't enabled.
NoMethodError exception raised

    undefined method `each' for nil:NilClass
    app/views/moderator/dashboards/_activity_tag.html.erb:10:in `_app_views_moderator_dashboards__activity_tag_html_erb__4366063041301266690_47304449138520'
    app/views/moderator/dashboards/show.html.erb:10:in `_app_views_moderator_dashboards_show_html_erb___734721021521262965_47304462731220'
2017-03-21 17:17:19 -05:00
Albert Yi fe9f31d871 remove timeout block
PostArchive isn't subject to statement timeouts so it isn't needed
2017-03-20 12:31:08 -07:00
evazion 8341752931 fixup! /moderator/dashboard: fix post version reference. 2017-03-19 17:02:39 -05:00
evazion cebf592e20 /moderator/dashboard: fix post version reference. 2017-03-18 05:18:01 -05:00
r888888888 d9a26975ba fix tests 2017-03-15 16:08:47 -07:00
Albert Yi 5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
r888888888 48e66cddbb fixes #2849: IP address search is broken 2017-01-20 15:37:26 -08:00
evazion cf046eecbf Fix ip addr search tests. 2017-01-12 09:28:52 +00:00
evazion 26c193dfb3 Change post_appeals.creator_ip_addr from integer to inet.
The existing values are garbage, rails stored e.g. "87.126.98.245" as
"87.126.98.245".to_i => 87. The column is nulled to indicate these IPs
are unknown.
2017-01-12 09:28:21 +00:00
evazion e8f71739be IpAddrSearch: search flags/appeals/artcomms/artists for IPs. 2017-01-12 09:28:21 +00:00
evazion 4848f18455 IpAddrSearch: fix pool_versions exception.
Fix pool_versions exception if PoolArchive db isn't set up. Prefer
ActiveRecord over raw sql so we can get real user objects so that the
view can use link_to_user.
2017-01-12 09:28:21 +00:00
evazion fde7829bf6 IpAddrSearch: simplify search_by_user_name, remove unused @errors. 2017-01-12 09:15:15 +00:00
Albert Yi 63c218d71d fixes #2825: Restore search within pool versions IP in mod tools 2017-01-09 18:12:54 -08:00
Albert Yi 4d698bf98b add modaction helper 2017-01-03 15:04:47 -08:00
Type-kun 3d2b81d1e8 Commented out references to pool_versions table 2017-01-02 11:44:06 +05:00
Albert Yi b2296cab70 bug fix for saved search update on tag batch changes 2016-12-28 12:40:00 -08:00
Albert Yi 62956be384 hide saved search functionality if not enabled 2016-12-21 14:53:39 -08:00
Albert Yi deb62e0cdb smarter updates on saved searches on tag batch changes #2674 2016-12-05 17:22:07 -08:00
Albert Yi eddf2e59f0 change formatting for modactions on alias/implication update + add mod action for tag batch changes 2016-12-05 14:46:02 -08:00
r888888888 ab6b5e49fe addresses #2674: aliases+updates should migrate saved searches 2016-09-14 18:48:45 -07:00
r888888888 634255e584 potential fix for #2591: Bulk update missed some posts 2016-04-25 16:52:57 -07:00
r888888888 4b24a5cb7e update to rails 4.2.5.1, add debugging info for tracking slow queries 2016-02-23 16:34:33 -08:00
r888888888 5b3a4b768c fixes #2557 2015-12-17 14:29:17 -08:00
Toks 508928924e IP search: normalize name capitalization and whitespace 2015-11-26 19:27:55 -05:00
r888888888 d8e84a90dc Revert "fixes #2530: improved ip addr search"
This reverts commit 1eb2d515fd.

Conflicts:
	app/views/moderator/ip_addrs/index.html.erb
2015-10-15 12:12:21 -07:00
r888888888 1eb2d515fd fixes #2530: improved ip addr search 2015-10-08 17:28:50 -07:00
Toks 643ab7b2c6 ip search: add quick links & improve usability
#2530
2015-10-08 01:14:48 -04:00
Toks 500f7a7812 Potential fix for #1985 2014-06-17 17:49:41 -04:00
r888888888 3ba7daebd1 include dmail ip addrs in search 2014-02-21 14:15:37 -08:00