Commit Graph

1647 Commits

Author SHA1 Message Date
r888888888
c7b5a4e229 add references to user statistics page about saved searches 2017-01-23 10:56:39 -08:00
r888888888
e80096bf19 fixes #2850: NoMethodError exception when sending DMail 2017-01-20 12:37:43 -08:00
Albert Yi
fa94eafef3 Merge pull request #2852 from evazion/fix-deleted-name-changes
Fix #2851: Account deletion should remove name change requests.
2017-01-20 11:35:54 -08:00
evazion
afb8eeea30 Fix exploit making user name change reasons being public in API. 2017-01-19 23:41:36 +00:00
evazion
7486bb0add Fix #2851: Account deletion should remove name change requests.
Hides name change requests for deleted users (username matches /user_[0-9]+~*/).
2017-01-19 22:32:13 +00:00
Type-kun
75c13cc953 Possible fix for issue #2849 2017-01-19 14:51:53 +05:00
r888888888
bfa56a860c fixes #2415: "Random post" causes RecordNotFound exceptions 2017-01-18 14:12:12 -08:00
r888888888
237c997ae1 remove usage of increment! #2835 2017-01-17 15:46:21 -08:00
Albert Yi
ae442c3391 fixes #2760: unable to register an account with a blank email 2017-01-16 14:56:08 -08:00
Albert Yi
a49394e6cd Merge pull request #2842 from evazion/fix-user-name-changes
Minor user name changes improvements.
2017-01-16 11:50:51 -08:00
Type-kun
5ce26c2e52 Remaining fixes to mod actions on user feedbacks and IP bans 2017-01-16 18:21:09 +05:00
evazion
f57f352838 Name changes: format processed requests more nicely. 2017-01-15 04:22:00 +00:00
Type-kun
02c243b968 Revert to: "Another partial fix for issue #2824, which also affected ip bans and feedback" 2017-01-14 21:53:33 +00:00
Type-kun
922276da6b Fixed typo in forum post mod action 2017-01-14 15:52:43 +05:00
Albert Yi
63d5c7900d enable bulk reverts, fixes to postarchive 2017-01-11 16:20:04 -08:00
Albert Yi
962f5b3dae fix typo 2017-01-11 14:43:36 -08:00
Albert Yi
0ab45ebc42 add postarchive model, fixes #2831: Replace Subscriptions Link With Search:All Link 2017-01-11 11:39:14 -08:00
evazion
1f325c19da Show previous usernames to members; link to actual change requests. 2017-01-11 13:07:39 -06:00
Albert Yi
1efe47f2f9 fix bug to token_count increment 2017-01-09 17:37:46 -08:00
Albert Yi
61c40e042b Merge pull request #2823 from evazion/fix-fav-order
Fix ordering of favlist
2017-01-09 17:36:46 -08:00
Albert Yi
5445b341bc fixes #2822: Post vote API: returns 200 for both success and failure; fixes bug with x-api-limit header 2017-01-09 17:31:14 -08:00
Albert Yi
f2a5d45db0 implement token bucket rate limiting 2017-01-09 17:31:14 -08:00
Type-kun
160d2a47aa Fixes #2758 2017-01-09 15:53:58 +05:00
Type-kun
9da5e67a65 Another partial fix for issue #2824, which also affected ip bans and feedback
Also fixed minor errors with IP bans
2017-01-09 13:57:16 +05:00
Type-kun
c44c40c759 Partial fix for issue #2824 2017-01-08 23:58:52 +05:00
evazion
2763f7e137 Fix ordering of favlists (sort by users who favorited first).
Fix bug introduced in 6e62a4c.
2017-01-08 00:57:36 +00:00
evazion
b9fa5a0816 posts: don't revalidate md5 uniqueness on every update. 2017-01-05 14:31:02 -06:00
Albert Yi
284008e078 eliminate antivoter concept 2017-01-03 17:11:00 -08:00
Albert Yi
094f30a44e Merge pull request #2819 from evazion/opt-favorited-users
Reduce SQL queries on /posts/:id
2017-01-03 16:29:20 -08:00
Albert Yi
b9a1e115fb add additional mod actions 2017-01-03 16:02:36 -08:00
Albert Yi
4d698bf98b add modaction helper 2017-01-03 15:04:47 -08:00
Albert Yi
4859a803c6 show description diffs in pool version listing 2017-01-03 14:40:53 -08:00
evazion
4e8006ae3b Optimize rendering of post commenter names.
Eager load post comments' creators and updaters. Fixes an N+1 queries
problem when rendering commenter names at:

    views/comments/partials/show/_comment.html.erb:6
    views/comments/partials/show/_comment.html.erb:20

while rendering /posts/:id pages.
2017-01-03 20:14:05 +00:00
evazion
6e62a4cc33 Optimize Post#favorited_users.
Load users in one query rather than one query per user.
2017-01-03 18:21:05 +00:00
Type-kun
3d2b81d1e8 Commented out references to pool_versions table 2017-01-02 11:44:06 +05:00
Albert Yi
74d02bde44 fixes #2812: StatementInvalid exception on all Profile Pages 2016-12-29 14:39:55 -08:00
evazion
c292587edb Add missing :platinum role to user/tag/dmail_filter attr_accessible lists. 2016-12-29 16:19:36 -06:00
evazion
6645847857 Simplify User#role. 2016-12-29 15:56:48 -06:00
evazion
d2e9ff363b Fix bug preventing Platinum users from commenting.
Bug:

Platinum users get this error when commenting:

    No route matches {:action=>"show", :controller=>"posts", :id=>nil}
    missing required keys: [:id]

Fix:

The issue was that `CurrentUser.role` was nil for Platinum users, which
caused `Comment.create(create_params, :as => CurrentUser.role)` to
silently ignore the create_params because the nil role wasn't in the
attr_accessible whitelist.

Despite this, things worked accidentally for other models because they
had `attr_accessible ..., :as => [:default]` in their whitelists where
the comment model didn't.
2016-12-29 15:45:23 -06:00
Albert Yi
0ea7d78584 remove usage of vcr cassettes; delete unused fixtures; fix some broken unit tests 2016-12-28 15:47:28 -08:00
evazion
8d714820a4 Fix undefined method is_deleted?' for nil` on /post_appeals.
Fix this exception:

    undefined method `is_deleted?' for nil:NilClass
    app/models/post_appeal.rb:72:in `resolved?'
    app/views/post_appeals/index.html.erb:23:in `block in _app_views_post_appeals_index_html_erb__2678117644687662585_70170674603580'
    app/views/post_appeals/index.html.erb:17:in `_app_views_post_appeals_index_html_erb__2678117644687662585_70170674603580'
    app/controllers/post_appeals_controller.rb:13:in `index'

that occurs on these pages:

    http://danbooru.donmai.us/post_appeals?limit=1&page=a2928
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2929
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2930
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2931
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2934
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2936
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2937
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2945
    http://danbooru.donmai.us/post_appeals?limit=1&page=a2949
2016-12-27 21:33:44 -06:00
Albert Yi
2fef0cdef9 Merge pull request #2804 from evazion/feat-comment-as-mod
Add option to comment as moderator (fix #2799)
2016-12-27 11:49:36 -08:00
Albert Yi
0293d1d01c Update comment.rb
allow Comment#for_creator to handle null user id case
2016-12-27 11:32:41 -08:00
evazion
82e93b3c12 Allow downvoting admin comments. 2016-12-26 23:52:45 -06:00
evazion
1257639109 Add 'post as moderator' option for comments.
* Add 'post as moderator' option to comment form. This creates a so-called sticky comment.
* Downvotes have no effect on stickied comments; they're always visible, regardless of comment thresholds.
* Only mods may sticky comments.
* Mods may sticky comments by other users.
2016-12-26 23:52:45 -06:00
evazion
1b05d5068a Simplify Comment.for_creator_name. 2016-12-26 23:52:27 -06:00
evazion
9347f27059 /comments.json: add id param; allow id and post_id to take lists of ids. 2016-12-26 23:52:27 -06:00
evazion
69c50290a8 Include updater_name in /comments/1.json. 2016-12-26 23:52:27 -06:00
evazion
85011c9192 Fix "'archive_development' database is not configured." exception. 2016-12-26 23:52:27 -06:00
r888888888
2584646017 add additional formatting for delayed job listing 2016-12-24 18:00:40 -08:00