evazion
0390039621
Fix expunging posts from S3 (fixup 4c4ef5c / #3180 ).
2017-07-01 12:30:59 -05:00
r888888888
4c4ef5cc5b
fixes #3180
2017-06-27 15:12:12 -07:00
evazion
c1834ab8dd
Inherit models from ApplicationRecord instead of ActiveRecord::Base.
2017-06-16 13:28:31 -05:00
evazion
5c6eb0f475
posts: remove unused update_iqdb method.
...
Unused since 7aab50f .
2017-06-14 21:31:30 -05:00
evazion
d84feaa4bb
posts: fix expunging posts not removing image from iqdb.
...
`File.exists?(preview_file_path)` is always false because the file has
already been deleted by this point. Remove the check entirely.
2017-06-14 21:31:30 -05:00
evazion
b27f98dc58
posts: fix expunging posts to delete files only after transaction succeeds.
2017-06-14 21:31:30 -05:00
evazion
a844a1daf4
posts: fix expunging posts not deleting files.
...
Fix expungement to ignore the "file still in use" check.
2017-06-14 21:31:24 -05:00
evazion
27aa9fe82a
post replacements: don't delete files still in use.
...
Bug: if a user replaces a post with another image, then replaces the
post back to the original image, then the deletion job for the original
image will still run. The will delete the original file, but that file
is now in use again and should not be deleted.
2017-06-13 02:20:23 -05:00
Albert Yi
f44f5d1fdb
Merge pull request #3126 from evazion/feat-queue-pools
...
Fix #3125 : Show pools in mod queue
2017-06-08 14:13:44 -07:00
evazion
58bd0670b7
Post#pools: avoid query when post has no pools.
2017-06-07 22:45:28 -05:00
evazion
151b276fb9
modqueue: display pools for each post ( fix #3125 ).
2017-06-07 22:45:01 -05:00
evazion
edd02c4019
artstation: normalize to www.artstation.com/artwork/$id for sidebar.
2017-06-07 10:20:18 -05:00
Albert Yi
2e78542a68
Merge pull request #3095 from evazion/fix-3091
...
Fix #3091 : Inconsistency between pool_string and pool.post_ids.
2017-05-30 11:14:46 -07:00
Albert Yi
5b56596de1
Merge pull request #3092 from evazion/opt-reltags
...
Optimize related tags calculation
2017-05-30 11:12:24 -07:00
evazion
31b58e17b1
pools: lock pool when adding/removing posts ( fixes #3091 ).
...
Adding a post id to a pool's post_ids string is non-atomic, hence we
must lock the pool to avoid a race condition.
Adding a pool to a post's pool_string is likewise non-atomic, hence we
must lock the post as well.
2017-05-26 18:35:33 -05:00
evazion
a401b1f570
posts: fix nil source tests; fix source:none metatag.
2017-05-26 15:12:39 -05:00
evazion
991d5cbf6d
related tags: optimize calculate_from_sample.
...
calculate_from_sample is called when clicking the General / Artist /
Copyright / Characters buttons during tag editing. Currently it's slow
because it counts up the tags in ruby, and because it makes repeated
calls to memcache in the inner loop when filtering tags by category.
This changes it to do the counting and filtering entirely in SQL using a
GROUP BY tag / COUNT(*) aggregation. This is faster and makes larger
sample sizes more feasible.
2017-05-26 12:41:48 -05:00
evazion
3aa405eac1
Post#favorited_by?: fix to cast to a boolean.
2017-05-23 13:12:10 -05:00
evazion
c5de983f61
Post#favorited_by?: fix to return a boolean.
2017-05-23 11:53:03 -05:00
evazion
565945ab7b
flags: move flagging inside Post#delete!
2017-05-17 23:48:37 -05:00
evazion
648cc9ecb7
Move post replacement create action to post replacements controller.
2017-05-14 21:31:01 -05:00
r888888888
78b08d8394
add new model for post replacements, add undo functionality
2017-05-12 17:11:40 -07:00
Albert Yi
dc02dcf0e0
Merge pull request #3015 from evazion/feat-replace-images
...
Fix #2949 : Sample image replacement ability
2017-05-12 17:11:29 -07:00
Albert Yi
f803137106
Merge pull request #3030 from evazion/feat-backups
...
Backup posts to S3 on creation/replacement
2017-05-08 13:39:41 -07:00
Albert Yi
0018a09f30
Merge pull request #3027 from evazion/feat-flag-cooldown
...
Add 3 day cooldown between flags
2017-05-08 13:05:38 -07:00
evazion
30a1f204e9
backups: add stub backup service.
2017-05-05 22:18:28 -05:00
evazion
d40da8c5c9
post replacement: leave a system comment after replacement.
2017-05-05 16:10:43 -05:00
evazion
8638b7527b
flags: don't set is_flagged twice.
...
PostFlag#update_post already sets is_flagged when the flag is created.
No need to set it again.
2017-05-04 16:51:49 -05:00
evazion
9f64857719
flags: move status locked check to post_flag.rb.
2017-05-04 16:51:49 -05:00
evazion
038e40ec98
post replacement: increase grace period to 30 days.
2017-05-04 12:30:27 -05:00
evazion
7ade3b6831
Fix #2352 : return raw usernames in API instead of pretty names.
2017-05-03 22:16:38 -05:00
evazion
dd920b3ffc
post replacement: disallow unhandled cases.
2017-05-02 20:41:18 -05:00
evazion
ca01539c4b
post replacement: delete old files after image is replaced.
2017-05-02 20:41:18 -05:00
evazion
e2b988a562
post replacement: add Post#replace! method.
2017-05-02 20:41:18 -05:00
evazion
1baffb31ff
Link dA sources as http://$artist.deviantart.com/art/$title-$id in sidebar.
...
Previously we used 'http://$artist.deviantart.com/gallery/#/d$id '. This
relied on a javascript redirect on Deviantart's end, which didn't work
for people with javascript disabled.
2017-05-01 23:29:16 -05:00
r888888888
48e9856f37
fixes #3007 : Eliminate Janitor role
2017-05-01 14:38:30 -07:00
r888888888
621bef3ddf
Revert "Merge pull request #2952 from evazion/fix-2950"
...
This reverts commit ae4509a541197684bfb0538f65afa827854b4335, reversing
changes made to eb008a0e765e231a8fdef594759a61798d6bd1d5.
2017-04-14 12:28:58 -07:00
evazion
c03aa79ece
Post#give_favorites_to_parent: wrap in transaction.
...
Ensure that if anything fails then the entire favorites move will be
rolled back.
2017-04-04 20:44:05 -05:00
r888888888
0801c80662
remove animated_gif and animated_png tags on create only #2960
2017-04-04 13:28:30 -07:00
r888888888
d3e876bedf
fixes img-master urls for pixiv source #2946
2017-04-04 12:53:52 -07:00
r888888888
3190ecb601
dont autoremove animated_gif and animated_png tags on update #2500
2017-04-04 12:44:45 -07:00
evazion
777937591e
Post#give_favorites_to_parent: move hidden favs.
2017-04-03 22:36:20 -05:00
evazion
70a7f77a48
Post#approve!: signal errors with invalid object instead of exception.
2017-04-03 17:18:32 -05:00
evazion
db0bcf08b9
Post#approve!: move approving logic to post_approval.rb.
2017-04-03 17:18:31 -05:00
evazion
258fc37bfe
Post#approve!: move validation to post_approval.rb
2017-04-03 17:18:31 -05:00
r888888888
87ff449f20
fixes #2951 : /post_versions is extremely slow
2017-04-03 15:03:59 -07:00
evazion
8fff3315f2
fix #2950 : don't send versions to archives if save fails.
2017-04-03 15:03:58 -07:00
Type-kun
1578c56b9d
Additional fix for #2946
2017-04-03 15:03:26 -07:00
evazion
964197d403
upload tags report: fix N+1 queries issues.
2017-04-03 15:03:26 -07:00
Albert Yi
8cd07ae70b
Merge pull request #2937 from evazion/fix-move-fav-upvotes
...
Upvote correctly when moving favorites (partial fix for #2936 )
2017-03-27 15:24:13 -07:00