Commit Graph

8617 Commits

Author SHA1 Message Date
evazion
ef89e7321f /artist_urls: convert to table builder. 2020-01-07 00:44:06 -06:00
evazion
6e86ca750e /dtext_links: convert to table builder. 2020-01-07 00:36:19 -06:00
evazion
47d95e8d80 forum: fix last page links leading to empty page.
Bug: on the forum index, clicking on 'page 290' of the Danbooru 2 Issues
thread leads to an empty page. The last page is actually page 288.

Cause: 89df0a6ac changed it so that deleted posts are filtered out of
threads, but this made the calculation of the last page incorrect. The
last page is calculated from the topic's response_count, but the
response count includes deleted posts.
2020-01-07 00:18:16 -06:00
evazion
3312030ce3 Fix #4240: only=… param malfunctioning on autocomplete API. 2020-01-07 00:01:14 -06:00
evazion
45f2530537 /ip_addresses: fix 'missing attribute: model_id' error
Fix crash on /ip_addresses page when using the group by option. Caused
by attempting to include model_id in the data attributes when it isn't
present when using this option. Fix is to only include attributes that
are actually present.
2020-01-06 23:22:55 -06:00
evazion
052008ee5d addthis: update script, hide when not enabled.
* Hide 'Share' section from sidebar when Addthis isn't enabled.
* Don't show popup menu until click.
2020-01-06 20:29:18 -06:00
evazion
f1528e0fae table builder: add 'striped' css class by default. 2020-01-06 02:12:04 -06:00
evazion
abe7f086b6 table builder: eliminate is_html_safe flag. 2020-01-06 01:56:16 -06:00
evazion
1d26fdab79 Update gems and yarn packages. 2020-01-06 01:22:41 -06:00
evazion
895199ecfc models: include all int/bool columns as html data attributes by default. 2020-01-05 22:57:47 -06:00
evazion
77935808e2 user profiles: fix links when Post.fast_count returns nil.
If Post.fast_count returns nil, then the link_to call becomes
link_to(nil, <posts_path>) so the link text becomes the url itself,
which isn't what we want.

Instead the count is displayed as a '?' mark to indicate that we don't
know the true count.
2020-01-05 17:48:50 -06:00
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