Commit Graph

8585 Commits

Author SHA1 Message Date
evazion
e02a145da2 comments: add reply/vote links to comment search page (#4236). 2019-12-30 23:00:53 -06:00
evazion
7da85a4eb7 rake: add images:backup rake task. 2019-12-30 23:00:53 -06:00
evazion
fe0bb1e602 rake: remove unused image tasks. 2019-12-30 23:00:53 -06:00
evazion
24ab98ccc8 Merge pull request #4237 from Nikey646/patch-1
Set Webpack Compile Output to true during development.
2019-12-30 00:16:54 -06:00
evazion
87fe3c63fb capistrano: fixup delayed jobs deployment. 2019-12-30 00:12:51 -06:00
Nikey646
b0c15dc946 Set Webpack Compile Output to true during development. 2019-12-30 14:14:01 +11:00
evazion
27c797f5c6 Fix #4230: Inconsistency between DText preview and DText renders of inline DText. 2019-12-28 13:28:45 -06:00
evazion
bb4be383b9 Fix #4231: Allow artist commentary titles to be formatted with DText. 2019-12-28 12:37:37 -06:00
evazion
c95108d37b maintenance: prevent exceptions from halting daily maintenance.
Fix cases where not all daily maintenance tasks run because some earlier
task raised an exception.
2019-12-28 00:21:56 -06:00
evazion
56d787a17f storage manager: make rclone path configurable.
Fix bug where pruning uploads failed because the rclone binary couldn't
be found. The upload pruner runs under cron, which has a fixed default
$PATH of "/bin:/usr/bin", but in production rclone is installed under
/usr/local/bin. This caused the upload pruner to fail, which prevented
the rest of daily maintenance from running.
2019-12-28 00:21:40 -06:00
evazion
159a4cc3d4 Update gems. 2019-12-27 16:18:30 -06:00
evazion
514b736a07 pools: fix crash in post_tags_match search option.
Fix exception in /pools/search[post_tags_match]=touhou. Caused by
`Pool.post_tags_match(query).count` generating invalid SQL (`count`
doesn't like the top-level cross join).

ref: https://danbooru.donmai.us/forum_topics/9127?page=289#forum_post_161821
2019-12-27 12:53:46 -06:00
evazion
3bcc503cf7 BURs: process bulk updates in dedicated job queue.
Add a dedicated queue for bulk update requests and process it using a
single worker. This prevents bulk updates from consuming all available
workers and preventing other job types from running.

This also effectively serializes bulk updates so that they're processed
one-at-a-time instead of in parallel. This will be slower overall but
may avoid some of the issues with indeterminate update order under
parallel updates.
2019-12-27 12:24:51 -06:00
evazion
06e12973e2 BURs: lock posts when updating tags during bulk updates.
Fixes updates sometimes getting clobbered when multiple aliases or mass
updates tried to update the same post at the same time.
2019-12-27 12:11:42 -06:00
evazion
3b4f9ad086 tags: fix post counts for nonexistent tags.
Fix a bug where the post count regenerator didn't fix counts for tags
that had a non-zero count but weren't present on any posts.
2019-12-27 11:24:05 -06:00
evazion
b6a3a05422 aliases: fix bug when trying to move wiki pages. 2019-12-26 15:13:14 -06:00
evazion
231e4872ed Re-enable post search counts and view counts.
Re-enable post view counts, post search counts, and missed search
counts. These were disabled in 89adf88d5 because of a bug caused by the
upgrade to rack-2.0.8 in a58dd83ad.

The bug was that rack-2.0.8 changed `session.id` to return a value of a
new wrapper type that doesn't respond to `to_s`. Previously it just
returned a string. Now we have to call `session[:session_id]` or
`session.id.public_id` to get a plain string. This was an undocumented
breaking change in rack-2.0.8 to fix CVE-2019-16782.
2019-12-25 23:53:50 -06:00
evazion
b02d84cfae winter sale: link to forum topic. 2019-12-24 18:19:44 -06:00
evazion
89adf88d50 temp disable search counts. 2019-12-24 17:13:17 -06:00
evazion
283bed64da temp disable view counts 2019-12-24 17:00:40 -06:00
evazion
963f1f7991 Add Danbooru Winter Sale.
* 25% off Gold and Platinum accounts.
* Free 6 tag searches for Member-level users.
* Runs from midnight Dec. 25th to 28th (UTC time).
2019-12-24 15:39:29 -06:00
evazion
ef2eb9d0f5 user upgrades: factor out gold/platinum prices. 2019-12-24 12:04:15 -06:00
evazion
7694be9cb3 users: remove no_flagging and no_feedback permissions. 2019-12-24 10:24:15 -06:00
evazion
939c168fe9 danbooru_default_config.rb: fix default storage dir. 2019-12-23 22:15:04 -06:00
evazion
432b3e19a9 config: don't use redis when not redis_url not configured. 2019-12-23 15:09:34 -06:00
evazion
2d7169c80f Remove useless binstubs. 2019-12-23 01:01:35 -06:00
evazion
bdebd1a594 approver pruner: change inactivity threshold to 30 approvals in 45 days.
* Change minimum activity threshold to 30 approvals in 45 days.
* Exclude mods from losing privileges, not just admins.
* Fix undeletions of old posts not counting towards the activity threshold.
2019-12-23 00:44:22 -06:00
evazion
ac9d06bf79 maintenance: remove hourly upload error checker. 2019-12-23 00:14:38 -06:00
evazion
b650558633 user feedbacks: replace permanent deletions with soft deletions.
* Add is_deleted flag.
* Allow mods to delete and undelete user feedbacks.
* Don't hide old name change feedbacks (these will be deleted instead).
2019-12-23 00:02:54 -06:00
evazion
cd442d60af tag_category.rb: fix windows line endings. 2019-12-22 21:24:00 -06:00
evazion
309821bf73 rubocop: fix various style issues. 2019-12-22 21:23:37 -06:00
evazion
09f6a84660 Add .rubocop.yml. 2019-12-22 21:23:36 -06:00
evazion
a58dd83ad7 Update ruby gems and yarn packages. 2019-12-22 17:33:52 -06:00
evazion
2320fad139 danbooru logger: fix request parameter filtering. 2019-12-22 17:33:51 -06:00
evazion
f586db97bc Merge pull request #4228 from danbooru/dependabot/bundler/rack-2.0.8
build(deps): bump rack from 2.0.7 to 2.0.8
2019-12-22 13:58:58 -06:00
dependabot[bot]
131fe45803 build(deps): bump rack from 2.0.7 to 2.0.8
Bumps [rack](https://github.com/rack/rack) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.7...2.0.8)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-18 22:39:08 +00:00
evazion
c606dfc181 posts: fix videos not looping.
Fixup for 15d737d68.
2019-12-18 03:44:59 -06:00
evazion
eddd43c21f recommender: fix typo in recommend_for_user. 2019-12-17 02:24:44 -06:00
evazion
fff4e3badd artists: allow members to rename, delete, and undelete artists.
Also allow Members to edit deleted or banned artists. Previously this
was limited in the html, but not in the backend.
2019-12-16 19:42:10 -06:00
evazion
ddf928515c wiki pages: allow members to rename, delete, and undelete wikis. 2019-12-16 19:42:10 -06:00
evazion
be9bdc0ab3 wiki pages: warn when renaming wikis still linked from other wikis.
* Warn when renaming a wiki that still has links from other wikis.
* When renaming a wiki that still has posts, just show a warning instead
  of returning an error and making the user confirm the rename.
2019-12-16 18:49:43 -06:00
evazion
b038761fa7 Post.fast_count: fix post count estimates when there are no posts.
Bug: Post.fast_count failed when Danbooru.config.estimate_post_counts
was enabled but the database didn't have any posts. This normally
happened only during testing.
2019-12-16 18:49:43 -06:00
evazion
82564355e6 Add better error page for database timeouts. 2019-12-16 13:38:06 -06:00
evazion
3d03de1c52 mod actions: hide ip bans from non-mods.
Hide IP ban creation and deletion actions from non-mods in the
/mod_actions listing.

The previous approach of just filtering out the IP from the description
was hacky and didn't work with the `only` param (/mod_actions.json?only=id
still included the description field).
2019-12-16 12:20:41 -06:00
evazion
84ba1d417f Fix #4220: Uploading from Tumblr is broken. 2019-12-15 19:04:52 -06:00
evazion
c96565dac2 Update gems and yarn packages. 2019-12-15 17:53:05 -06:00
evazion
e0f5103e4a reltags: fix nil exception on fast_count timeouts.
Fixes a nil dereference error when calculating related tags for the
sidebar. Cased by Post.fast_count returning nil when it times out.
2019-12-15 17:06:58 -06:00
evazion
41378bc8e3 sources: replace HttpartyCache with Danbooru::Http. 2019-12-15 17:06:58 -06:00
evazion
0adec60259 recommender: replace HttpartyCache with Danbooru::Http. 2019-12-15 15:48:38 -06:00
evazion
518de2fdec cloudflare: fix purging of cached urls.
* Switch CloudflareService from HttpartyCache to Danbooru::Http.

* Purge cached urls from Cloudflare when a post is replaced and the md5
  doesn't change. This happens when a corrupted image is replaced or
  thumbnails are regenerated. Before we purged urls when a post was
  expunged, which was unneeded because those urls can expire naturally.
  It was also wrong because the subdomains were hardcoded, the urls used
  http:// instead of https://, and we didn't account for tagged urls.
2019-12-15 14:03:15 -06:00