r888888888
da170aa413
fixes #3307
2017-10-09 13:34:58 -07:00
r888888888
0bfd201973
simplify logic
2017-09-13 14:47:42 -07:00
r888888888
1f3bafc061
delegate removal from favorites and updating of user fav counts to delayed job
2017-09-13 14:19:54 -07:00
evazion
af42740ca9
expunge: decrement user favorite counts.
2017-09-13 13:29:35 -07:00
evazion
fd9dc6f647
expunge: decrement upload and note/post update counts ( fix #2062 ).
2017-09-13 13:29:35 -07:00
r888888888
ed75e4bcf6
disable cropped thumbnails
2017-09-12 17:14:12 -07:00
r888888888
9041a5bc34
delegate thumbnails to cache
2017-09-12 15:51:20 -07:00
r888888888
4fb55657c0
refactor cropped images into explore/posts/intro
2017-09-12 13:03:59 -07:00
r888888888
99e38c9e95
defer to cdn for cropped thumbnails
2017-09-08 16:49:50 -07:00
r888888888
68863ed018
fixes #3287
2017-09-08 15:01:12 -07:00
r888888888
bc69badadd
better error handling of failed deviant art logins
2017-08-28 16:19:41 -07:00
r888888888
b769b83262
use Cache.hash instead of Cache.sanitize
2017-08-24 15:43:38 -07:00
Albert Yi
9d4697d5cc
Merge pull request #3240 from evazion/fix-3235
...
Fix #3235 : Replacements deleting files currently in use.
2017-07-26 17:10:44 -07:00
evazion
b53371b698
Fix #3235 : Replacements deleting files currently in use.
2017-07-24 23:43:38 -05:00
evazion
67528ce5ab
Fix hidden attribute leaks in legacy post controller ( #3237 ).
2017-07-24 20:35:12 -05:00
evazion
bda285d97f
Post#expunge!: simplify has_children flag logic.
2017-07-21 00:13:20 -05:00
evazion
44f6673d94
Post#expunge!: run callbacks when reparenting children.
...
* Set parent IDs with `update` instead of `update_column` /
`update_all` when reparenting children. This fixes it so that new post
versions are saved and the has_children flag is set on the new parent.
* Slightly simplify logic of update_children_on_destroy: the single
child case is subsumed by the multi-child case.
2017-07-21 00:13:20 -05:00
evazion
fbee7f6912
Post#expunge!: fix remove_pool! to remove posts from deleted pools.
...
Don't silently ignore attempts to remove posts from deleted pools.
Remove the restriction on removing posts from deleted pools instead (ref: #1109 ).
Fixes failure to remove posts from deleted pools during expungement.
2017-07-21 00:13:20 -05:00
evazion
1b310dcc0b
Post#expunge!: fix remove_from_all_pools to clear deleted pools.
...
* Change Post#pools to return all pools, including deleted pools. This
fixes remove_all_from_pools to remove the post from deleted pools too.
* Change other users of Post#pools to explicitly select undeleted pools.
2017-07-21 00:13:20 -05:00
evazion
bac8ff4de0
Post#expunge!: destroy post replacements on expunge.
2017-07-21 00:13:20 -05:00
evazion
3ed14ae782
Post#expunge!: wrap in transaction.
2017-07-21 00:13:20 -05:00
r888888888
d48ed95191
favoritescontroller#destroy should work even if the post doesn't exist, remove from favorites on expunge ( fixes #3222 )
2017-07-19 13:39:24 -07:00
r888888888
3a0a032908
remove destroy callback on Post#favorites
2017-07-18 16:32:28 -07:00
evazion
4ead45a787
Remove Post#validate_parent_does_not_have_a_parent method ( #3206 ).
...
Not used; posts are allowed to have grandparents.
2017-07-14 17:49:12 -05:00
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