Commit Graph

1574 Commits

Author SHA1 Message Date
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
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
Albert Yi
4706cae114 Add user permissions for flagging and for giving user feedback 2018-12-11 17:08:31 -08:00
evazion
c75aef38ed set diff: fix obsolete_{added,removed} not including changed items. 2018-12-10 00:17:01 -06:00
evazion
e25e8d564a artist versions: refactor diffs. 2018-12-07 12:45:51 -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
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
Albert Yi
fe612908cd add creator_ip_addr field to user feedback 2018-11-29 16:51:46 -08:00
Albert Yi
60cee5f452 Merge pull request #3989 from evazion/fix-3987
Wiki pages: convert other_names column to array (#3987)
2018-11-19 16:23:32 -08: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
Albert Yi
0508b127fd continue refactoring savedsearch 2018-11-15 12:06:13 -08:00
evazion
308a5021b4 wiki pages: convert other_names to array (#3987). 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
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
115ed16a96 pools: store post_ids as array instead of string (fix #3979) 2018-11-08 15:09:31 -06:00
r888888888
8da51b4555 change default response for empty popularsearchservice response 2018-11-05 21:35:57 -08:00
evazion
628341f7f0 Fix #3969: Translated tags should ignore artist tags. 2018-11-04 17:07:35 -06:00
evazion
0152cbe39e moebooru: fix delegation to nil strategy (fixup for 5cf6a43). 2018-11-04 15:24:22 -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
Albert Yi
9cfbda64bf fixes #3967 2018-11-02 14:21:41 -07:00
Albert Yi
9a12fc45d3 fix missed references to tags param when navigating posts sequentially 2018-10-31 16:15:07 -07:00
evazion
39374a70d3 posts/show: rename tags params to q in various places.
Fixup for 011a6f1f7.
2018-10-30 11:32:07 -05:00
Albert Yi
04c741739d ignore md5 dups in upload error checker 2018-10-25 14:06:44 -07:00
r888888888
a7dd05fc8f provide default import profile for vipsthumbnail 2018-10-24 23:06:12 -07:00
Albert Yi
4d07183a1d Merge pull request #3957 from evazion/fix-related-tags
Related tags: build html server-side, eliminate cookies
2018-10-24 17:34:14 -07:00
Albert Yi
9899199f33 eliminate weeklymaintenance file 2018-10-23 17:50:28 -07:00
Albert Yi
5d3f072a2f fix wiki excerpt links 2018-10-22 13:15:33 -07:00
r888888888
e060236fb7 add exception for direct links to pixiv fanbox images 2018-10-20 23:58:19 -07:00
r888888888
77cc4ad625 marginally smarter PostSets::Post#best_post algorithm 2018-10-20 20:08:42 -07:00
r888888888
4ec92d3aa0 fix for popular search service 2018-10-20 20:00:59 -07:00
r888888888
6d27ebcbf2 go back one day on popular search service if no results are found 2018-10-20 19:48:53 -07:00
r888888888
192ac128cd add additional meta tags for seo 2018-10-20 17:15:29 -07:00
Albert Yi
12b88f7f97 fixes #3960 2018-10-17 15:37:47 -07: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
Albert Yi
2aabaf56d8 Merge pull request #3951 from evazion/fix-maintenance-logging
Improve daily maintenance error handling
2018-10-15 14:20:44 -07: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
Albert Yi
a85f3773e3 fix nil commentary case for pixiv strategy #3948 2018-10-12 14:35:44 -07:00
Albert Yi
d15c0b8266 fix delete file delayedjob 2018-10-11 16:43:16 -07:00
Albert Yi
185d303ba1 eliminate tag cache expiry delayed job 2018-10-11 16:36:50 -07:00
Albert Yi
ca7e7e2877 add additional servers to cloudflare expiry service 2018-10-11 11:42:15 -07:00
Albert Yi
6ca9b65716 add dynamic sitemap.xml 2018-10-11 10:13:54 -07:00
evazion
5e57cccd18 maintenance: log errors to rails log and newrelic. 2018-10-09 20:11:42 -05:00