Commit Graph

182 Commits

Author SHA1 Message Date
r888888888
28c3f8321a add failing test for #3307 2017-10-09 13:23:45 -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
Albert Yi
e4bc01533b Merge pull request #3245 from evazion/fix-2344
Fix #2344: Negating status metatag breaks deleted post filter.
2017-07-31 12:50:21 -07:00
Albert Yi
fe6ae4b3d1 Merge pull request #3233 from evazion/feat-order-metatags
Add order:{tagcount,gentags,arttags,chartags,copytags} metatags.
2017-07-31 11:56:06 -07:00
evazion
1c38fbbf64 Fix #2344: Negating status metatag breaks deleted post filter. 2017-07-28 19:52:35 -05:00
evazion
fffc107d4f Add order:{tagcount,gentags,arttags,chartags,copytags} metatags. 2017-07-21 23:11:02 -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
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
evazion
3e3844a796 Remove unused tag subscription code (#2956, #3206). 2017-07-13 13:44:26 -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
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
r888888888
bffa1f3dc3 fix unit tests 2017-05-30 17:37:42 -07:00
evazion
a401b1f570 posts: fix nil source tests; fix source:none metatag. 2017-05-26 15:12:39 -05:00
evazion
2259506bc2 flags: disallow flagging pending posts. 2017-05-19 14:37:38 -05:00
Albert Yi
a4220854a3 Merge pull request #3063 from evazion/fix-post-delete
Fix flagging cooldown preventing manual deletions.
2017-05-18 13:44:27 -07:00
evazion
3570ace017 flags: ignore flagging rate-limits when deleting posts. 2017-05-17 23:48:37 -05:00
evazion
565945ab7b flags: move flagging inside Post#delete! 2017-05-17 23:48:37 -05:00
evazion
cd3914f17c post replacement: move tests to post_replacement_test.rb. 2017-05-17 00:14:41 -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
evazion
d40da8c5c9 post replacement: leave a system comment after replacement. 2017-05-05 16:10:43 -05:00
Albert Yi
b6e1958917 Merge pull request #3017 from evazion/fix-deviantart-links
Fix links to DeviantArt sources
2017-05-03 15:49:16 -07:00
evazion
5f2219a005 post replacement: add tests. 2017-05-02 20:42:41 -05:00
evazion
93c9b622a1 post_approval.rb: log correct post id when approving deleted posts. 2017-05-02 00:01:21 -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
Albert Yi
d7e83bef79 Merge pull request #3003 from evazion/feat-noter-any-metatag
Add noter:<any|none>, commenter:<any|none> metatags
2017-05-01 14:52:30 -07:00
r888888888
48e9856f37 fixes #3007: Eliminate Janitor role 2017-05-01 14:38:30 -07:00
evazion
25aaef5afe Add tests for noter:<any|none>, comm:<any|none> metatags. 2017-04-26 16:51:34 -05:00
evazion
c0e5c400a7 tests: fix tests for Rails.cache. 2017-04-16 16:48:36 -05:00
evazion
777937591e Post#give_favorites_to_parent: move hidden favs. 2017-04-03 22:36:20 -05:00
evazion
5db39f308a tests: fix post approval tests. 2017-04-03 17:18:32 -05:00
evazion
4470828a3d post_test.rb: add tests for moving favorites. 2017-03-24 15:43:55 -05:00
evazion
a5ecda2f0e post_test.rb: fix voting tests. 2017-03-24 15:43:55 -05:00
r888888888
d9a26975ba fix tests 2017-03-15 16:08:47 -07:00
r888888888
6bd03ee4db fix tests 2017-02-21 15:04:55 -08:00
Albert Yi
5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
evazion
f971f927fd post_test.rb: add tag name validation tests. 2017-02-08 23:31:30 -06:00
r888888888
c01f48f18c mock pool archive service in post test 2017-02-07 14:14:36 -08:00
evazion
35b3398142 post_test.rb: add more metatag search tests. 2017-02-06 18:48:39 -06:00
evazion
3edd814be5 tests: add iqdb queries controller tests. 2017-02-06 18:48:37 -06:00
evazion
e8cf417e9c tests: update gems to latest versions.
Also fix a few things that broke under shoulda-matchers 3.1.1.
2017-02-04 22:17:15 -06:00
evazion
beddc34958 tests: set Delayed::Worker.delay_jobs = false globally. 2017-02-04 17:18:51 -06:00
evazion
a327854017 Fix post_update_count increment test.
7) Failure:
PostTest#test_: Tagging: A post that has been updated should increment the updater's post_update_count. [/home/danbooru/src/danbooru/test/unit/post_test.rb:1010]:
"CurrentUser.post_update_count" didn't change by 1.
Expected: 1
  Actual: 3
2017-02-03 04:04:02 -06:00
evazion
601b439f96 Add order:comment_bumped, order:comment_bumped_asc metatags. 2017-01-21 11:10:40 +00:00
Albert Yi
ee4ebce4d7 support pool version archive 2016-12-21 11:43:46 -08:00
evazion
96a38f8d1b Test pixiv id parsing for novel/background/profile images. 2016-12-04 02:04:44 -06:00
evazion
0697af6d23 Fix #2771: Approving deleted image doesn't create mod action. 2016-11-28 02:50:07 -06:00