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
evazion
5f1b7f48f7
Fix exception when autotagging animated_gifs.
...
Fixes this exception caused by the animated_gif autotagger trying to access the
image file, which fails if the image is not hosted on the webserver.
Magick::ImageMagickError exception raised
unable to open image `/var/www/danbooru2/releases/20170322212609/public/data/f0e32c0e2d906c4932858866346f98b5.gif': No such file or directory @ error/blob.c/OpenBlob/2712
app/models/post.rb:177:in `ping'
app/models/post.rb:177:in `is_animated_gif?'
app/models/post.rb:684:in `add_automatic_tags'
app/models/post.rb:638:in `normalize_tags'
app/controllers/posts_controller.rb:49:in `update'
2017-03-26 18:12:13 -05:00
evazion
3dc854c0c8
post_vote.rb: determine vote magnitude from voter, not CurrentUser.
...
Bug: when moving favorites, the parent is given an upvote for each gold+
favoriter, but the magnitude of these upvotes was based on the
CurrentUser, rather than the upvoter. This meant that upvotes for
supervoter favorites weren't given correctly.
To fix this, `magnitude` is changed to use the voting `user` instead of
CurrentUser.
New problem: when setting the score, `score=` calls `magnitude`, but
`user` isn't initialized yet. So we also refactor so that
1. `initialize_attributes` initializes `user` before setting `score`
2. the vote direction is given by `vote`, so it's separate from `score`
3. updating the score on the post happens in a callback instead of
directly in `score=`.
2017-03-24 15:43:55 -05:00
evazion
07707b257a
post.rb: make non-gold supervoters upvote when fav'ing a post.
2017-03-24 15:43:55 -05:00
evazion
fd24ea5876
posts.rb: vote on behalf of correct user when moving favorites.
...
Bug: when an approver moves the favorites of a post, each favorite is
removed from the child post and added to the parent post. For gold+
users, this triggers an upvote, but these upvotes were performed by the
approver rather than the favoriter.
2017-03-24 15:43:28 -05:00
evazion
4fde2a26fb
post.rb: handle automatic *_(cosplay) tags in TagImplication.
2017-03-23 02:48:03 -05:00
r888888888
b3e3012a9c
link to upload advice thread for deleted posts
2017-03-22 16:33:14 -07:00
r888888888
e946d23fa7
enable s3 proxy (wave 1)
2017-03-09 18:18:06 -08:00
evazion
2bb134f08d
modqueue: highlight uploads containing "bad" tags.
2017-03-01 15:31:16 -06:00
Albert Yi
5404c1d231
implement postarchive
2017-02-21 13:40:52 -08:00
evazion
c926f75918
fixup! post.rb: validate newly added tags.
2017-02-09 02:14:48 -06:00
evazion
facf819620
post.rb: validate newly added tags.
...
Existing tags with invalid names are still permitted. This is to allow
for a gradual transition to good tag names.
2017-02-08 23:31:30 -06:00
evazion
347f11b935
post.rb: group validation methods together.
2017-02-08 23:31:30 -06:00
r888888888
f0a8598ba2
update aws gem, stub in rake tasks for s3
2017-02-08 15:06:54 -08:00
r888888888
b57b54113f
add cdn hosted flag to posts
2017-02-07 17:26:16 -08:00
Albert Yi
1c837aba6e
Merge pull request #2879 from evazion/fix-dead-code
...
Eliminate dead code
2017-02-07 13:56:05 -08:00
evazion
b5bf9b8678
post.rb: remove assorted unused methods.
2017-02-06 19:07:03 -06:00
evazion
35b3398142
post_test.rb: add more metatag search tests.
2017-02-06 18:48:39 -06:00
Albert Yi
4357c6e718
Merge pull request #2874 from evazion/fix-tests
...
Fix various failing tests
2017-02-03 14:28:42 -08:00
r888888888
497011289f
fixes #2865 : Undeleting a post doesn't resolve flags
2017-02-03 14:22:21 -08:00