Commit Graph
7542 Commits
Author SHA1 Message Date
evazion c78dece411 tag corrections: remove distributed cache logic (#3943).
Remove logic for displaying the state of the tag category cache on both
servers.
2018-10-04 13:46:10 -05:00
evazion 4ab97a01bd Fix #3943: Eliminate legacy code for distributed memcached servers. 2018-10-04 13:22:49 -05:00
evazion 060112293b /users: add more search params. 2018-10-04 13:03:18 -05:00
evazion 0966a290e4 Fix #3941: Add ability to search users by inviter. 2018-10-04 12:44:59 -05:00
r888888888 abbe181de6 add cronjob for syncing files 2018-10-04 01:51:42 -07:00
r888888888 25c0c8884c move production2 configs to production 2018-10-04 01:12:25 -07:00
r888888888 82cb31eb28 standardize on new servers 2018-10-04 01:11:31 -07:00
r888888888 a45bd52e89 delete files job should move to default queue 2018-10-04 01:08:30 -07:00
Albert Yi 27072d695d add lcms2 dependency in install 2018-10-03 13:52:04 -07:00
Albert Yi 6a0d44b496 fixes for production2 env 2018-10-03 13:09:52 -07:00
Albert Yi 897d3d3a99 add production2 env for testing new servers 2018-10-03 11:23:26 -07:00
evazion 4fd949ca8d news updates: fix news updates not staying hidden.
ref: https://danbooru.donmai.us/forum_posts/151011

Bug: `Cookie.get("news-ticker") === key` always returned false because
the cookie was a string but the key was an integer.

Regressed in f72b32b27b after switching from `==` to `===`.
2018-10-02 13:28:41 -05:00
evazion d727e0e34c Fix #3939: Quoting a post with apostrophes replaces them with '. 2018-10-01 20:24:00 -05:00
evazion bd3fb7d70e Post#normalized_source: fix for yande.re urls.
Fix regex for yande.re urls like this:

    https://files.yande.re/image/b66909b940e8d77accab7c9b25aa4dc3/yande.re%20377828.png
2018-10-01 20:03:21 -05:00
evazion 0c5452cdc3 Fix #3937: Blank lines in tagbox if certain taggroups are absent 2018-10-01 19:47:39 -05:00
evazion eeadd1ef11 artists/tags subnav: prefer direct tag count over Post#fast_count. 2018-10-01 17:51:48 -05:00
Albert Yi 02156f3f34 Merge pull request #3933 from evazion/fix-tag-set-presenter
Optimize tag set presenters
2018-10-01 12:55:05 -07:00
Albert Yi 88310c4beb Merge pull request #3935 from evazion/fix-3934
Fix #3934: Post#fast_count has very slow worst case behavior
2018-10-01 12:47:45 -07:00
evazion 35eaf28822 Post#fast_count: lower timeout to 1 second. 2018-10-01 12:55:57 -05:00
evazion ccb57e802c Fix #3934: Post#fast_count has very slow worst case behavior. 2018-10-01 12:55:57 -05:00
evazion 215591403e uploads: fix 'rating:safe' not assigning the rating (#3929). 2018-10-01 11:09:00 -05:00
evazion 2ae7ec42df Post#fast_count: raise min cache lifetime to 3 minutes (#3925). 2018-10-01 10:38:15 -05:00
evazion 4425150298 Post#fast_count: fix cache expiry not being set (#3925). 2018-10-01 10:38:15 -05:00
evazion 151fa00933 tests: fix tests for /comments/new, /post_flags/new. 2018-10-01 10:38:15 -05:00
evazion 88a177e1d5 TagSetPresenter: refactor humanized_essential_tag_string.
Move Post#humanized_essential_tag_string to TagSetPresenter#humanized_essential_tag_string.

This allows humanized_essential_tag_string to reuse the same set of tags
already fetched by the tag set presenter for the sidebar.

This avoids fetching the tag categories from memcache again (via
Post#typed_tags) when we're already fetched the tags once before.

This also means it's no longer necessary to cache humanized_essential_tag_string
itself in memcache, since it can be generated as quickly as the sidebar taglist.
2018-09-30 21:52:24 -05:00
evazion 739bb1270c TagSetPresenter: refactor tag string for post edit form.
Move PostPresenter#categorized_tag_groups to TagSetPresenter#split_tag_list_text.

This allows split_tag_list_text to reuse the same set of tags already
fetched by the tag set presenter for the sidebar.

This avoids a memcache call to get the tag categories when rendering the
tag string for the post edit form.
2018-09-30 21:52:24 -05:00
evazion b1f2096d72 TagSetPresenter: refactor *_tag_list_html to avoid memcache calls.
Refactor the tag set presenter to get both the tag categories and the
tag counts in the same call to the database, instead of getting the
counts from the db and the categories from memcache.
2018-09-30 21:52:24 -05:00
evazion 99632d5e8a TagSetPresenter: refactor to pass options explicitly.
Refactor tag_list_html, split_tag_list_html, and inline_tag_list_html to
take the `show_extra_links` and `current_query` options explicitly,
rather than implicitly relying on CurrentUser or taking `params[:tags]`
from the template.
2018-09-30 21:52:24 -05:00
evazion 2cc4e35cc9 Fix #3930: Can't remove children from a parent post through child: metatag.
Add `child:none` and `-child:123` edit metatags. Allow using ranges with
these metatags (e.g. `-child:1..10`, `child:1,3,5`).
2018-09-29 20:42:38 -05:00
evazion 929fd29c33 Fix post archive test failures.
Fix test failures due to Post#versions not being defined when post
archives wasn't enabled because the SQS url wasn't configured.
2018-09-29 20:42:38 -05:00
evazion dfb7cf6994 comments: add standalone new comment form.
Add standalone /comments/new page to allow commenting if javascript is
disabled.
2018-09-29 20:42:38 -05:00
evazion 9ac59aeadd comments.js: clean up comment quoting.
Replace Comment.quote with a remote new.js.erb call.
2018-09-29 20:42:38 -05:00
evazion 75232c0cd4 comments.js: clean up unnecessary code.
* Remove Dtext import (no longer used).
* Remove create.js.erb template (not used).
* Don't hide `#hidden-comments-notice-for-...` (didn't exist).
2018-09-29 20:42:38 -05:00
evazion 984cd0432c Fix #3928: fix case sensitivity in metatags. 2018-09-27 23:42:30 -05:00
Albert Yi 6a375d04e0 fix indentation 2018-09-27 16:58:22 -07:00
Albert Yi 05dfb5de60 disable prefetch 2018-09-27 16:49:52 -07:00
Albert Yi 9c65961d04 Merge pull request #3923 from evazion/fix-3922
#3922: Render flag/appeal/replacement dialogs via ajax.
2018-09-27 12:55:02 -07:00
evazion 654d40875f posts/show: only render detailed rejection dialog for approvers. 2018-09-26 20:46:22 -05:00
evazion a5438aaf37 Fix dtext preview button to use event delegation.
Fixes the dtext preview button and dtext expandable to work with
dynamically loaded dtext forms.
2018-09-26 20:01:49 -05:00
evazion 6aecbf4a7e posts/show: skip rendering dialogs for anon users.
Anonymous users can't use any of the artist commentary / add to pool /
add to favgroup dialogs, so rendering them is unnecessary.
2018-09-26 20:01:49 -05:00
evazion f886f2fdb3 posts/show: load flag/appeal/replacement dialogs via ajax (#3922). 2018-09-26 20:01:14 -05:00
evazion d1e9f9c3ce Fix broken test artist controller tests, tag alias test. 2018-09-26 00:42:47 -05:00
evazion f5c9616f62 tests: fix broken tests. 2018-09-24 17:34:08 -05:00
evazion d9063a9f2a nijie: support preview urls (#3919). 2018-09-24 17:08:37 -05:00
evazion 99babe19f3 views/static: removed unused templates. 2018-09-23 20:18:34 -05:00
evazion d188e5be33 wiki_page.rb: remove dead methods. 2018-09-23 20:13:51 -05:00
evazion 52704ef6cd nijie: take artist id from url when possible (#3919)
Fixes the artist finder to work on Nijie posts that have been deleted.
2018-09-23 20:08:14 -05:00
evazion 5525bbe1ca nijie: normalize all thumbnail urls (#3919). 2018-09-23 20:08:14 -05:00
evazion d294514dc0 nijie: don't crash on invalid urls or deleted works (#3919). 2018-09-23 20:08:14 -05:00
evazion b6228505aa nijie: fix page_url method.
The id in a bare image url is the member id, not the illust id.
2018-09-23 20:08:13 -05:00