evazion
d52d5ff260
Fix #4018 : Drag and drop upload errors
...
Disable upload timeout. This timeout caused uploads to silently fail when
the timeout was exceeded (ref: https://gitlab.com/meno/dropzone/issues/23 ).
2018-12-16 17:45:26 -06:00
evazion
8408c0bf80
Fix #3815 : Adjust notes positions/sizes after post replacement
...
Bug: Notes weren't rescaled when the 'final_source' field was given
during replacement.
The cause was that the notes were rescaled after the source was saved,
but saving the source clobbered `image_{width,height}_before_last_save`
inside `rescale_notes`.
Regressed in b0c2ddba .
2018-12-16 13:55:35 -06:00
evazion
d2f92b7aa7
artists: fix quick search to search urls.
...
ref: https://danbooru.donmai.us/forum_topics/9127?page=265#forum_post_153124
2018-12-16 12:07:50 -06:00
evazion
004f1e630d
binstubs: revert to rails binstubs ( 77b42310)
...
Silence complaints from rails about using Bundler-generated binstubs.
2018-12-16 11:50:16 -06:00
evazion
c700ea4b5f
Fix #4016 : Translated tags failing to find some tags.
...
* Normalize spaces to underscores when saving other names. Preserve case
since case can be significant.
* Fix WikiPage#other_names_include to search case-insensitively (note:
this prevents using the index).
* Fix sources to return the raw tags in `#tags` and the normalized tags
in `#normalized_tags`. The normalized tags are the tags that will be
matched against other names.
2018-12-16 11:37:57 -06:00
evazion
a1df1abf0b
Fix #4020 : Flagger name information leak.
2018-12-14 18:08:43 -06:00
evazion
9de5857032
Fix #4015 : Exception: undefined method `level_class' for nil:NilClass.
2018-12-12 17:57:29 -06:00
evazion
79ec053cef
Fix #4009 : Tag list is empty when editing tags, causing destructive changes.
2018-12-12 13:02:04 -06:00
evazion
cacc899a4d
autocomplete: limit static metatags to 10 matches.
...
Prevents autocomplete menu from becoming excessively long when
completing order: metatags.
2018-12-11 12:02:18 -06:00
evazion
28f32abe24
Fix migrations.
2018-12-10 19:38:56 -06:00
evazion
fe60672ef3
Fix #4005 : Add confirmation for unbanning a post.
2018-12-10 00:39:02 -06:00
evazion
61f6de5ff3
artist versions: rearrange layout to better fit small screens.
...
* Move group name beneath the artist name.
* Replace 'Active' column with '(deleted)' notice next to artist name.
* Combine updater, updated at, and ip address fields in single column.
* Combine templates for standard listing and revert listing (only
difference is presense of 'Revert to' column).
2018-12-10 00:30:05 -06:00
evazion
c75aef38ed
set diff: fix obsolete_{added,removed} not including changed items.
2018-12-10 00:17:01 -06:00
evazion
161b3bb8ef
diffs.scss: readd styles removed in e25e8d564.
...
The <ins> and <del> tags are still used in /post_versions and /reports/upload_tags.
2018-12-10 00:17:01 -06:00
evazion
d213173d3d
Fix #4002 : Always include "updated by" line when creator != updater
2018-12-08 11:30:11 -06:00
evazion
e25e8d564a
artist versions: refactor diffs.
2018-12-07 12:45:51 -06:00
evazion
7ae27c370d
Fix #3995 : Automatically imply *_school_uniform -> school_uniform.
2018-12-05 12:19:27 -06:00
evazion
7bbe4e8ac1
moebooru: don't exclude artists from translated tags ( #3969 ).
2018-12-05 11:53:26 -06:00
evazion
fd2d56a388
Fix #3996 : Some direct artstation urls cause the bookmarklet to fail.
...
* Don't fail on urls that don't contain the project id (direct image urls).
* Don't fail when the work is deleted.
* Parse artist name from url when possible. This way the artist finder works on bad_artstation_id posts.
* Set canonical source url to `https://artist.artstation.com/projects/12345 ` instead of
`https://www.artstation.com/artwork/1235 ` (this way we preserve the artist name).
* Cache api call.
* Include api call results in /source.json.
2018-12-03 15:48:29 -06:00
evazion
f00641b3ac
Fix #3998 : Some artist histories throw exceptions.
2018-12-02 11:45:57 -06:00
evazion
811bad5a86
/source.json: include raw api responses in output ( #3940 ).
2018-11-30 00:19:00 -06:00
evazion
e8c3d92696
Fix #3977 : DeviantArt: Support new wixmp.com urls.
2018-11-30 00:10:59 -06:00
evazion
8da3474a8b
Fix #3994 : Some deviantart images mistakenly choosing preview image.
2018-11-29 23:01:08 -06:00
evazion
600b17cd9f
Fix #3961 : Tags in dialog boxes sometimes colored incorrectly
...
Fix rules so that the `.ui-widget-content .category-0 a` rule for tags
overrides the `.ui-widget-content a` rule for normal links.
2018-11-24 10:55:38 -06:00
evazion
d82418ed43
Fix #3988 : ordpool:<name> fails for large pools.
...
Also fixes ordpool:<name> not returning all posts in the correct order
when searching for series pools that contain duplicate posts.
2018-11-16 22:48:17 -06:00
evazion
41ff05c121
artists: convert other_names to array ( #3987 ).
2018-11-15 14:31:16 -06:00
evazion
29fdfc42a4
pools/gallery: allow searching for collection pools ( #3992 ).
...
Default to showing only series pools when not doing a search. Otherwise,
when doing a search, show both series and collection pools.
2018-11-15 12:22:51 -06:00
evazion
4fcb82f2e6
Fix #3991 : Loading post #1604318 is broken.
...
Fix exception in Pool#previous_post_id when the post id is not contained
in the pool.
This can happen when a post's pool_string lists the post as being in a
certain pool, but the post is not included in the pool's post_ids. Such
pool_string / post_ids inconsistencies exist because of past bugs.
2018-11-15 10:28:20 -06:00
evazion
741462ae68
artist versions: convert other_names, url_string to arrays ( #3987 ).
2018-11-14 14:25:02 -06:00
evazion
fe2698a011
tag implications: convert descendant_names to array ( #3987 ).
2018-11-14 12:51:18 -06:00
evazion
308a5021b4
wiki pages: convert other_names to array ( #3987 ).
2018-11-13 19:18:11 -06:00
evazion
b660aeefd7
application record: add array_attribute method.
...
Add `array_attribute` method that defines helper methods for converting
array attributes to or from strings.
2018-11-13 19:18:11 -06:00
evazion
bea8c2a4b8
nijie: fix failure to handle certain image urls.
...
Fix IMAGE_URL regex not matching urls of this form:
* https://pic04.nijie.info/nijie_picture/diff/main/287736_161475_20181112032855_1.png
This caused the illust id to not be parsed from the url, which led to `#image_url`
returning nil, which led to uploads failing because the url to download was missing.
2018-11-12 18:04:07 -06:00
evazion
8f6c710c6b
tests: fix translated tags test failures.
2018-11-12 18:04:07 -06:00
evazion
7524d52276
Fix #3985 : Uploads: 405 Method Not Allowed.
2018-11-11 20:18:21 -06:00
evazion
6a7cd6ce8e
Fix #3984 : Twitter: undefined method `first' for nil:NilClass.
...
Fix Sources::Strategies::Twitter#image_urls to return an empty array
instead of nil when the tweet doesn't contain any images.
2018-11-11 17:41:32 -06:00
evazion
a20eba9ef7
Fix #3983 : Uploads: NoMethodError - undefined method `>=' for nil:NilClass
...
* Rename Upload#download_for_upload to #get_file_for_upload.
* Fix #get_file_for_upload to raise error if no file or source url was given.
* Fix javascript upload validation to disallow submitting form if file is
not present and the source is not an url.
2018-11-11 17:12:39 -06:00
evazion
e10c6c6a30
Fix #3982 : Uploads: URI::InvalidURIError - URI must be ascii only.
2018-11-11 12:17:58 -06:00
evazion
eade33fa7c
Fix #3981 : Inconsistency between posts and pools.
2018-11-10 12:37:08 -06:00
evazion
e69cbe7f81
pools: post_count fixups.
2018-11-08 19:35:17 -06:00
evazion
fb7d83c54f
pools: drop post_count column ( fix #3667 )
2018-11-08 15:35:41 -06:00
evazion
115ed16a96
pools: store post_ids as array instead of string ( fix #3979 )
2018-11-08 15:09:31 -06:00
evazion
572645d888
pools: cleanup unneeded code.
...
* create_mod_action_for_destroy didn't exist (pools are never destroyed).
* is_active and is_deleted are already initialized via database defaults.
* creator_name is already defined by belongs_to_creator.
* Returning true/false in validations does nothing.
2018-11-07 16:10:36 -06:00
evazion
1281481548
Fix #3978 : Pool name/category validations not being enforced.
2018-11-07 16:10:16 -06:00
evazion
a6aa75873d
Fix #3976 : DText external links appear broken.
2018-11-06 20:17:45 -06:00
evazion
ed47db0e48
upload tags report: add controller test ( #3975 ).
2018-11-06 18:29:27 -06:00
evazion
5c4a310589
Fix #3975 : Upload tags report is broken.
2018-11-06 18:18:18 -06:00
evazion
bd0bb658b8
Fix #3974 : Pool galleries: link thumbnails to pools instead of posts.
2018-11-06 14:33:04 -06:00
evazion
841104f09a
post presenter: fixup typo in 26c1eadf.
2018-11-06 13:15:09 -06:00
evazion
ff9ce25b01
Fix #3973 : Pool gallery is broken.
2018-11-06 13:11:11 -06:00
evazion
26c1eadf6a
modqueue: move score highlighting from js to presenter.
...
The 'post-has-children' class was dropped because it was unused
('post-status-has-children' is already added elsewhere).
2018-11-06 10:42:48 -06:00
evazion
2eb284f31e
modqueue: simplify detailed rejection dialog js.
2018-11-06 10:42:48 -06:00
evazion
b730a86870
modqueue: clear detailed rejection form before each use.
...
Bug: in the modqueue, if a user does a detailed rejection of one post,
then tries to do a detailed rejection of another post, the form will
still be filled in with the rejection message from the previous post.
2018-11-06 10:42:48 -06:00
evazion
00f36605c4
modqueue: fix typo in 1d3eb584c
2018-11-05 17:27:33 -06:00
evazion
1cba439589
Fix #3971 : Keyboard navigation inside pools is broken.
2018-11-05 13:04:21 -06:00
evazion
5b3f3253a4
related tags: fix broken translated tag names
...
ref: https://danbooru.donmai.us/forum_topics/9127?page=261#forum_post_152040
2018-11-05 12:54:53 -06:00
evazion
98cffc310b
Fix pool elements controller tests.
2018-11-04 21:25:25 -06:00
evazion
29b6121a07
pools: refactor #neighbors + fix broken #neighbors tests.
2018-11-04 19:40:57 -06:00
evazion
628341f7f0
Fix #3969 : Translated tags should ignore artist tags.
2018-11-04 17:07:35 -06:00
evazion
19b92acabc
Fix #3970 : Make "Copy all notes" not builder exclusive.
2018-11-04 16:42:55 -06:00
evazion
0152cbe39e
moebooru: fix delegation to nil strategy (fixup for 5cf6a43).
2018-11-04 15:24:22 -06:00
evazion
c7e6c2a44a
posts: fix pixiv id parsing (fixup for 5cf6a43)
2018-11-04 14:22:29 -06:00
evazion
5cf6a43918
sources: fix sources sometimes choosing wrong strategy ( fix #3968 )
...
Fix sources choosing the wrong strategy when the referer belongs to a
different site (for example, when uploading a twitter post with a pixiv
referer).
* Fix `match?` to only consider the main url, not the referer.
* Change `match?` to match against a list of domains given by the `domains` method.
* Change `match?` to an instance method.
2018-11-04 13:00:17 -06:00
evazion
f5012464ab
Fix #3965 : Extraneous API attributes.
...
Remove the updater_id/updater_ip_addr virtual attributes from
pools/notes. Juss pass them in as params to create_version instead.
2018-10-30 15:41:17 -05:00
evazion
39374a70d3
posts/show: rename tags params to q in various places.
...
Fixup for 011a6f1f7 .
2018-10-30 11:32:07 -05:00
evazion
77a576d5ed
related tags: strip http:// from artist urls.
2018-10-25 23:38:24 -05:00
evazion
705217d337
Fix new dtext shortlinks redirecting to nonexistent pages.
...
Fix the following dtext shortlinks redirecting to nonexistent pages:
* flag #1
* appeal #1
* mod action #1
* bur #1
2018-10-25 23:00:43 -05:00
evazion
a2186c19dc
Fix positioning of tag edit dialog box.
...
Bug: if you open the tag edit dialog with shift+e, close it, then open
it again, it won't be vertically centered when it opens the second time.
Fix: hide the related tags section *before* opening the dialog, not after.
Hiding it afterwards shifts the layout, which uncenters the dialog.
2018-10-25 22:39:29 -05:00
evazion
6148cb39a2
Fix nested blank search params not being stripped from searches.
...
From https://danbooru.donmai.us/forum_topics/9127?page=258#forum_post_151308 :
When you do a user search (from https://danbooru.donmai.us/users/search )
the results only include those with someone in the inviter field.
The bug was that nested blank search params (/users?search[inviter][name_matches]=)
didn't get stripped from the search.
2018-10-17 16:11:44 -05:00
evazion
6d293dfde2
related tags: fix style issues.
2018-10-16 13:09:22 -05:00
evazion
b166c8116a
related tags: fix unnecessary .erb extensions, remove unused ids.
2018-10-15 18:42:04 -05:00
evazion
33ca028927
related tags: fix initialization logic for recent/frequent/translated/artist columns.
...
Initialize the recent tags, frequent tags, translated tags, and artist
tags columns only once, when the related tags section is first shown.
The related tags section is shown automatically when the 'Edit' tab is
opened, or by default on the uploads page.
This fixes the /related_tags.js and /source.js calls being triggered
every time the tag edit dialog box or the 'Edit' tab was opened.
2018-10-15 18:42:04 -05:00
evazion
6223f89a99
related tags: refactor /related_tags.js to avoid updating unchanged columns.
...
Refactor the /related_tags.js call so that when the "Related tags"
button is clicked, it only replaces the columns that actually changed,
not the entire related tags section.
This avoids rebuilding the Recent / Frequent / Translated Tags / Artist
columns every time the "Related tags" button is clicked.
2018-10-15 18:41:32 -05:00
evazion
d536f75505
related tags: eliminate recent_tags cookie ( #3955 ).
2018-10-12 21:20:06 -05:00
evazion
ae52b487e8
related tags: eliminate favorite_tags cookie ( #3955 ).
2018-10-12 21:18:15 -05:00
evazion
4e2944ee06
related tags: build html server-side instead of client-side.
2018-10-12 21:18:15 -05:00
evazion
5a05961bde
related tags: factor partials out from post, upload edit forms.
2018-10-12 21:18:15 -05:00
evazion
e329764276
Fix #3952 : Adding animated_gif tag to a ugoira post breaks the player.
2018-10-10 23:50:36 -05:00
evazion
60ea46e1e7
Add sample newrelic config.
2018-10-09 20:11:44 -05:00
evazion
5e57cccd18
maintenance: log errors to rails log and newrelic.
2018-10-09 20:11:42 -05:00
evazion
6e54c37b04
maintenance: add rake tasks for maintenance jobs.
2018-10-09 20:11:24 -05:00
evazion
5201954413
maintenance: consolidate maintenance tasks in logical/maintenance.rb.
2018-10-09 20:11:23 -05:00
evazion
53a51310a3
tumblr: add canonical url tests ( #3385 ).
2018-10-09 12:55:48 -05:00
evazion
16b1b72da5
tumblr: fix video urls not being recognized.
2018-10-09 12:44:59 -05:00
evazion
184a5ebf3e
tumblr: fix _640 images not being recognized ( #3944 ).
...
Fixes _640 images not being matched by the IMAGE regex and therefore not
being rewritten to the largest size.
2018-10-09 12:44:59 -05:00
evazion
d874c68419
tumblr: fix image_urls when api data is unavailable.
2018-10-09 12:44:59 -05:00
evazion
b0d7d90103
tumblr: extract info from url when api data is unavailable.
...
Derive the artist name / profile url / page url from the source URLs when
the API response is unavailable because the Tumblr post was deleted.
This fixes the artist finder to work on bad_tumblr_id posts.
2018-10-09 12:44:59 -05:00
evazion
0c31a5d6a9
tumblr: don't fail when api data is unavailable ( #3948 ).
...
The api data is unavailable when the work is deleted (bad_tumblr_id), or
when the source is a direct image url with no page referer.
2018-10-09 12:44:59 -05:00
evazion
4c55c809b0
tumblr: don't fail when api key isn't configured.
2018-10-09 12:44:59 -05:00
evazion
8aed1e19b9
tumblr: remove obsolete cdn rewrite rule.
...
This cdn is no longer used by tumblr.
2018-10-09 12:44:59 -05:00
evazion
5d77f1db08
daily maintenance: remove dead tag pruner code.
2018-10-06 14:27:53 -05:00
evazion
c8d538f618
moebooru: delegate to substrategy based on post source ( #3911 ).
...
If the yande.re or konachan.com post has a source from a supported site,
for example Pixiv or Twitter, then delegate the artist and commentary
lookup to that substrategy.
Only do this for sources from recognized sites, not the null strategy.
2018-10-06 14:27:49 -05:00
evazion
e5a4193dd4
moebooru: support batch bookmarklet previews ( #3911 ).
2018-10-06 00:58:22 -05:00
evazion
fdb6e4ecee
moebooru: rewrite konachan urls for Post#normalized_source ( #3911 ).
2018-10-06 00:58:22 -05:00
evazion
864349dc7b
moebooru: fetch tags ( #3911 ).
2018-10-06 00:58:22 -05:00
evazion
7eee77d520
moebooru: proxy images to avoid hotlink protection ( #3911 ).
...
Fix image previews being broken on the upload page due to yande.re not
allowing hotlinking of images.
2018-10-06 00:58:22 -05:00
evazion
9301bf2f11
tests: fix post expungement test.
...
Delay jobs so the uploaded file isn't deleted immediately (see f6c928e660 ).
2018-10-06 00:58:22 -05:00
evazion
1e710e1ae0
tests: fix typo in artist controller test.
2018-10-04 21:55:17 -05:00
evazion
f6c928e660
tests: fix upload service tests.
...
Fix regression in a45bd52e9. Delay jobs so that that the dead upload
pruner doesn't immediately prune new uploads.
2018-10-04 21:52:18 -05:00
evazion
bb5f291112
artists: don't create new version when nothing changed.
...
Fix an issue where saving an artist entry without changing anything
would create a new artist version.
2018-10-04 20:01:38 -05:00