Commit Graph

8606 Commits

Author SHA1 Message Date
evazion
faeec18efc twitter: add hashtag normalization test.
Add test for #4243. Also fix warning from bootsnap:

    iseq.rb:18: warning: nested repeat operator '+' and '?' was replaced with '*' in regular expression: /(?<!\A)生誕祭(?:\d+)?\z/
2020-01-05 17:38:30 -06:00
evazion
692e5957a2 Merge pull request #4243 from BrokenEagle/normalized-twitter-hashtags
Add normalization for Twitter hashtags
2020-01-05 17:30:05 -06:00
evazion
ce64091a09 views: remove unused data-current-user-* attributes.
Remove data-current-user-* attributes that aren't needed by Danbooru and
aren't likely to be needed by third parties.
2020-01-05 17:11:12 -06:00
BrokenEagle
67860a845c Add normalization for Twitter hashtags 2020-01-05 23:01:50 +00:00
evazion
ee212f8ebb css: fix references to data-user attributes on <body> tag.
Fixup for 5e03c3d84.
2020-01-05 16:41:42 -06:00
evazion
4b33d5a1c9 Merge pull request #4242 from BrokenEagle/add-api-data
Add API data to show/index views
2020-01-05 16:34:29 -06:00
BrokenEagle
5e03c3d84e Adjust naming of user and model attributes
- Remove unnecessary attributes that cause additional SQL queries
- Remove unneeded check for nil on current_item
2020-01-05 19:46:08 +00:00
BrokenEagle
4b904dff5a Convert classes to use data attributes
- Remote resolved classes on post flags since they were unused
2020-01-04 22:02:45 +00:00
BrokenEagle
223a6df5d8 Add API data to show/index views 2020-01-04 22:02:44 +00:00
BrokenEagle
e8a96c1a2a Standardized naming of version list views 2020-01-04 22:02:44 +00:00
BrokenEagle
be92282990 Combine version partials into one file 2020-01-04 22:02:43 +00:00
BrokenEagle
89df0a6ace Adjust how deleted forums get shown
- In some cases deleted items weren't visible from the index view
- There also shouldn't be any reason why they can't be shown when searched for specifically
-- This also matches the behavior on comments
2020-01-04 22:02:43 +00:00
BrokenEagle
043944e1dd Convert index tables to using table builder 2020-01-04 22:02:43 +00:00
evazion
917ffa87ed users: remove score confidence intervals from /users index.
These were originally used to find uploaders with high-scoring uploads
for promotion purposes. The weekly reports generated by Reportbooru are
better suited for this.

Also clean up some unused and redundant code.
2020-01-02 01:44:03 -06:00
evazion
ab3f6dd800 Update gems. 2020-01-02 01:29:55 -06:00
evazion
c251d145e4 Revert "Add Danbooru Winter Sale."
This reverts commit 963f1f7991.
2020-01-02 01:29:55 -06:00
evazion
44140c6ec8 Merge pull request #4238 from BrokenEagle/add-scary-font
Add scary font
2020-01-02 01:28:39 -06:00
evazion
5341dc4197 tags: remove Tag.trending method.
This is used for the frontpage taglist when popular searches are
disabled. This isn't used in production and there's no need for it in
development.
2020-01-01 13:59:20 -06:00
evazion
c0171f49a6 storage manager: add option for storing files under original/ dir.
Add option to allow for storing original files under an `original/`
subdir. Previously preview, crop, and sample files were stored under
subdirs but original files were stored in the top-level directory. This
is optional for backwards compatibility.
2020-01-01 13:46:05 -06:00
BrokenEagle
4c6d3a5608 Added scary font 2020-01-01 03:06:40 +00:00
evazion
cc6ae7792a comments: fix delete comment ajax call.
Broken because the markup changed and because it doesn't change the
delete link to undelete. Easier to just reload.
2019-12-30 23:00:53 -06:00
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