Commit Graph

139 Commits

Author SHA1 Message Date
r888888888
d12f082f9a fixes #3300 2017-09-14 11:37:42 -07:00
evazion
a56c1bbb76 artists: fix validation error when url_string has leading spaces.
Bug: if the url_string had leading spaces, when it was split the
resulting array contained the empty string, which led to a validation
error when trying to save the urls.

Fixup for #3247.
2017-08-04 01:05:25 -05:00
evazion
10614d2152 artists: show success/error message when updating artists. 2017-07-29 01:44:05 -05:00
evazion
6121b8cb25 artists: simplify artist url saving code.
Refactor the way artist urls are saved so that artist url validations
run before the artist is saved, not after.
2017-07-29 01:41:37 -05:00
evazion
af35c82d96 Remove unused Artist#legacy_api_hash method (#3206).
Added in 0e0d83c7 but never used. app/views/legacy/artists.{json,xml}.erb
is what *would* use this, but neither does.
2017-07-09 13:49:20 -05:00
evazion
dc36476d50 nijie: don't return bogus artists when artist finder finds no match. 2017-06-20 17:09:57 -05:00
evazion
3560bbbd47 pawoo: don't return bogus artists when artist finder doesn't find a match. 2017-06-19 17:10:02 -05:00
evazion
c1834ab8dd Inherit models from ApplicationRecord instead of ActiveRecord::Base. 2017-06-16 13:28:31 -05:00
r888888888
216ca06fee fixes #3100 2017-05-30 15:38:01 -07:00
r888888888
f38810bd1c fixes #3086 2017-05-24 15:57:06 -07:00
evazion
2c29a7ac19 /artists: only include domains in /artists/1234.json, not /artists.json. 2017-05-14 10:38:26 -05:00
r888888888
5ad7f1af91 cache artist domains, show artist domains in wiki excerpt on post listing 2017-05-12 14:50:37 -07:00
r888888888
66458c34b0 fixes #3014 2017-05-02 15:39:16 -07:00
r888888888
440c5219bd memoize domains 2017-05-01 15:52:32 -07:00
r888888888
62c9beafc2 fixes #2993: Artist URL breakdown 2017-05-01 15:48:04 -07:00
r888888888
48e9856f37 fixes #3007: Eliminate Janitor role 2017-05-01 14:38:30 -07:00
evazion
d1188d8184 /artists: add search params: has_tag, name/other_names/group_name/any_name/url_matches. 2017-04-26 14:08:18 -05:00
evazion
30872ebb41 Fix #2990: Wiki Autocomplete Misses On Certain Meta-wikis
/wiki_pages?search[order]=post_count didn't include wiki pages that
didn't belong to a tag. This was due to doing an inner join on the tags
table instead of a left outer join.
2017-04-23 16:55:15 -05:00
r888888888
68f057e7ba refactor how artist notes are updated 2017-04-18 17:07:12 -07:00
r888888888
19b8d41d09 refactor forum notifications for tag changes 2017-04-12 16:43:15 -07:00
r888888888
75bca7341b remove status init on artist create 2017-04-10 14:30:34 -07:00
evazion
6b462c865e /artists: sort autocomplete by post count.
* Add search[order]=post_count param to /artists.
* Make autocomplete do a prefix match ordered by post count, so that it
  works the same way that tag autocomplete does elsewhere.
2017-04-07 18:25:31 -05:00
evazion
fbba167f0c artist.rb: fix ambiguous column references.
Using `search[empty_only]=true` caused certain queries to throw an
exception due to ambiguous column references after joining on the tags
table.

Example:

    https://danbooru.donmai.us/artists?search[empty_only]=true&search[name]=hammer*

    PG::AmbiguousColumn exception raised
    ERROR: column reference "name" is ambiguous LINE 1: ...ags"."name" = "artists"."name" WHERE (true) AND ((name LIKE ... ^
    lib/danbooru/paginator/active_record_extension.rb:108:in `total_count'
    lib/danbooru/paginator/active_record_extension.rb:63:in `block in paginate_numbered'
    lib/danbooru/paginator/active_record_extension.rb:60:in `tap'
    lib/danbooru/paginator/active_record_extension.rb:60:in `paginate_numbered'
    lib/danbooru/paginator/active_record_extension.rb:15:in `paginate'
    app/controllers/artists_controller.rb:41:in `index'
2017-04-07 18:25:31 -05:00
evazion
e67194c19d Set approver when creating banned_artist implication. 2016-10-26 21:52:19 -05:00
Albert Yi
2a5343b8cf add more intelligent js for artist forms 2016-10-18 14:56:40 -07:00
evazion
c46b31aa9c Prevent reverting to foreign versions (fixes #2711). 2016-10-11 06:57:46 +00:00
evazion
98f16b7105 Artist finder: Don't return bogus results for non-matching twitter artists. 2016-10-05 08:13:27 +00:00
r888888888
20779d52d0 final fix for #2688: Artists are uneditable 2016-09-26 12:02:35 -07:00
Type-kun
23f4232bd2 Style obsolete artist changes (fixes #1171) 2016-08-28 23:12:35 +05:00
r888888888
dc9f35fc48 show banned artist info to gold members 2016-07-29 16:54:47 -07:00
r888888888
f51857f5f2 fix artist ban 2016-03-05 17:17:53 -08:00
r888888888
4b24a5cb7e update to rails 4.2.5.1, add debugging info for tracking slow queries 2016-02-23 16:34:33 -08:00
r888888888
6480864718 fixes #2469 2015-10-15 15:24:24 -07:00
r888888888
6ce5223399 fixes #2526: Don't allow special characters ('*', etc...) in artist names 2015-10-06 15:03:12 -07:00
Toks
30c4cb1e5a Fix error when trying to edit an artist twice
fixes #2483
2015-08-09 10:16:37 -04:00
r888888888
65d52ebb40 fixes #1897: the "version" field will be updated even when versions are merged 2015-08-06 15:21:06 -07:00
Toks
b22670a2be Support searching list of ids for artists, aliases, implications, BURs
fix #2455
2015-07-25 00:13:29 -04:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
r888888888
f38cf1526c use Sources::Site to look up artists by profile page 2015-02-14 23:30:05 -08:00
Toks
a6c389a281 #2321: Fix for 3+ dupes too 2014-12-09 21:24:00 -05:00
Toks
bc4d954ec0 Automatically remove dupe urls
fix #2321
2014-12-09 21:09:55 -05:00
r888888888
f9c341a794 dont recreate artist urls that havent changed 2014-12-03 15:01:22 -08:00
evazion
57bb51621e Add debugger gem.
Fix random VCR failures in Pixiv tests.

Sometimes tests randomly fail because the PHPSESSID they use in their
HTTP requests to Pixiv is different than the one that was originally
recorded by VCR. This causes VCR to complain that the requests don't
match.

This is caused by the PHPSESSID being globally cached in Memcache.
Depending on the order the tests run in (which is random), one set of
tests can use a PHPSESSID that was recorded for a /different/ set of
tests.

Improve Pixiv URL matching.

* Allow URLs that are missing the http:// part. These are sometimes seen
  in artist entries.
* Ignore URLs from random Pixiv domains such as dic.pixiv.net,
  blog.pixiv.net, etc. These are also sometimes in artist entries.

Improve normalize_for_artist_finder! URL matching.

* Normalize www.pixiv.net/stacc/username URLs.
* Correctly normalize URLs that are missing the illust ID part on the end
  (i.e. http://i2.pixiv.net/img04/img/syounen_no_uta/). These are common
  in artist entries.

Match URLs strictly when normalizing for artist entries.

Only normalize Pixiv URLs that strictly match a known format. Pass any
unrecognized URLs through without attempting to normalize them, just to
be safe.

Normalize URLs when saving artist entries.
2014-12-03 13:16:05 -08:00
Toks
a541b18f82 fixes #2313 2014-11-27 20:14:29 -05:00
Toks
ed6b08e65b Make large wiki/artist/pool title link to tag search 2014-10-13 17:44:40 -04:00
evazion
dcbe061809 Move normalize_for_artist_finder! into model.
Move the call to normalize_for_artist_finder! from the artist
controller into Artist#find_all_by_url. This makes testing easier.
It also makes it so that URLs are normalized when using the search
form on the artist listing page.
2014-10-05 14:11:32 -05:00
Toks
4b9605075b Rewrite tumblr cdn urls 2014-10-03 14:36:37 -04:00
Toks
9b1ac69da2 Don't display pending aliases on artist page 2014-06-05 14:59:53 -04:00
Toks
70fd527c85 fixes #2157 2014-05-16 20:48:40 -04:00
Toks
22f2a76569 Don't return incorrect artist finder results
Applies to nicoseiga, tumblr, and deviantart; fixes #2134
2014-04-28 15:01:07 -04:00