Commit Graph

4492 Commits

Author SHA1 Message Date
r888888888
f374eec4a1 fixes #2869: Add way to differentiate Pool Descriptions from Pool History 2017-02-14 16:03:19 -08:00
r888888888
aa41c41572 fixes #2876: Changing approver/contributor privileges should log mod action 2017-02-14 12:46:54 -08:00
r888888888
ed8a8001f4 fixes #2859: search:uncategorized should search for uncategorized saved searches 2017-02-14 11:58:43 -08:00
r888888888
651dad473d fixes #2884: Comment unvoting is broken 2017-02-14 10:35:27 -08:00
Albert Yi
7aa0107e2b Merge pull request #2882 from evazion/fix-tag-name-validation
Enforce stricter rules for tag names
2017-02-10 12:02:55 -08:00
r888888888
dce57a8ae1 disable tag subscription updates 2017-02-09 15:38:42 -08:00
evazion
c926f75918 fixup! post.rb: validate newly added tags. 2017-02-09 02:14:48 -06:00
evazion
facf819620 post.rb: validate newly added tags.
Existing tags with invalid names are still permitted. This is to allow
for a gradual transition to good tag names.
2017-02-08 23:31:30 -06:00
evazion
347f11b935 post.rb: group validation methods together. 2017-02-08 23:31:30 -06:00
evazion
8e3296f3ea tag.rb: don't strip '%' or ',' from tags; split on unicode spaces.
Allows '%' and ',' in tag names. There's no technical need to forbid
these characters.

Fixes an issue with these characters being stripped away inside metatags
(e.g. tagging a post with `pool:ichigo_100%` strips away the '%').
2017-02-08 23:31:30 -06:00
evazion
853ddc7cda tag.rb: validate tag names.
Makes these tag names invalid when tagging posts:

* Blank names (e.g. ___).
* Non-ASCII characters (Japanese text).
* Non-printable characters (e.g. control characters < 0x20).
* Leading or trailing underscores, or consecutive underscores. Reason:
  `_foo__bar_` and `foo_bar` both render as `foo bar` in the tag list.
* Leading `-` or `~`, or '*' (-foo, ~foo, foo*bar). Previously
  these were silently stripped, but that meant tagging a post with e.g.
  `*-foo` tagged the post with the invalid tag `-foo`.
* Tag type prefixes (e.g. `character:character:hatsune_miku` no longer creates
  the literal tag `character:hatsune_miku`).
* Metatags (order:score, user:evazion, etc).
2017-02-08 23:30:23 -06:00
r888888888
f0a8598ba2 update aws gem, stub in rake tasks for s3 2017-02-08 15:06:54 -08:00
r888888888
b57b54113f add cdn hosted flag to posts 2017-02-07 17:26:16 -08:00
Albert Yi
1c837aba6e Merge pull request #2879 from evazion/fix-dead-code
Eliminate dead code
2017-02-07 13:56:05 -08:00
Albert Yi
b1c33f2379 Merge pull request #2878 from evazion/fix-test-coverage
Improve controller test coverage
2017-02-07 13:45:16 -08:00
r888888888
7a3d1c7d1d dont download original artstation images if they dont exist 2017-02-07 13:40:19 -08:00
r888888888
9996030496 include default referer url for art station strategy 2017-02-06 17:37:45 -08:00
r888888888
39b6601afe Merge branch 'artstation' 2017-02-06 17:07:57 -08:00
r888888888
7a2f652152 add source strategy for artstation 2017-02-06 17:07:09 -08:00
evazion
951e6d4b5f Remove unused arbitrary_sql_order_clause.
Unused since f87c71c.
2017-02-06 19:07:04 -06:00
evazion
b5bf9b8678 post.rb: remove assorted unused methods. 2017-02-06 19:07:03 -06:00
evazion
74b8ebe580 tag.rb: remove unused find_suggestions, increment_view_count.
find_suggestions unused since ca3e9bb.
2017-02-06 19:07:03 -06:00
evazion
23038de470 posts_controller.rb: remove unused /posts/home action.
Unused since a4911e3.
2017-02-06 19:07:03 -06:00
evazion
7e1f63de6a landings_controller.rb: remove unused /landing route.
Broken since PopularPostExplorer was removed in 7269ec0.
2017-02-06 19:07:03 -06:00
evazion
38355b4839 posts_helper.rb: remove unused resize_image_links.
Unused since 1ef7ef4.
2017-02-06 19:07:03 -06:00
evazion
4ded9c6b2a app/helpers: remove unused helpers. 2017-02-06 19:07:02 -06:00
evazion
ec653dce71 app/presenters: remove unused forum_post/note/post_version presenters. 2017-02-06 19:07:02 -06:00
evazion
35b3398142 post_test.rb: add more metatag search tests. 2017-02-06 18:48:39 -06:00
evazion
64b4004bbf tests: add favorite groups controller tests. 2017-02-06 18:48:35 -06:00
evazion
d74503ae05 tests: add misc controller tests. 2017-02-06 18:48:35 -06:00
r888888888
2e69cd619e resize medium + small artstation urls also 2017-02-06 15:22:06 -08:00
r888888888
5c16e9ce48 add download strategy for artstation 2017-02-06 12:03:00 -08:00
r888888888
6bf050c607 add download strategy for artstation 2017-02-06 11:59:27 -08:00
evazion
98b0b2c5d8 tests: fix Net::HTTP::Persistent::Error: too many connection resets.
Works around connection reset errors in the test suite by disabling
persistent connections.

  20) Error:
Sources::PixivTest#test_: in all cases fetching source data for a new manga image should get the tags. :
Net::HTTP::Persistent::Error: too many connection resets (due to closed stream - IOError) after 0 requests on 47071328584700, last used 1.842702476 seconds ago
  app/logical/pixiv_web_agent.rb:46:in `build'
  app/logical/sources/strategies/pixiv.rb:104:in `agent'
  app/logical/sources/strategies/pixiv.rb:72:in `get'
  app/logical/sources/site.rb:6:in `get'
  test/unit/sources/pixiv_test.rb:7:in `get_source'
  test/unit/sources/pixiv_test.rb:64:in `block (3 levels) in <class:PixivTest>'

ref: github.com/sparklemotion/mechanize/issues/123
ref: http://www.rubydoc.info/gems/mechanize/Mechanize#retry_change_requests%3D-instance_method
2017-02-04 17:07:00 -06:00
r888888888
3965903210 fixes #2875: Encoding::CompatibilityError on /explore/posts/searches 2017-02-03 14:44:13 -08:00
Albert Yi
4357c6e718 Merge pull request #2874 from evazion/fix-tests
Fix various failing tests
2017-02-03 14:28:42 -08:00
Albert Yi
3a06e5486c Merge pull request #2873 from evazion/fix-hotkeys
Disable left/right keys for prev/next page on /posts/:id.
2017-02-03 14:28:03 -08:00
r888888888
497011289f fixes #2865: Undeleting a post doesn't resolve flags 2017-02-03 14:22:21 -08:00
evazion
a327854017 Fix post_update_count increment test.
7) Failure:
PostTest#test_: Tagging: A post that has been updated should increment the updater's post_update_count. [/home/danbooru/src/danbooru/test/unit/post_test.rb:1010]:
"CurrentUser.post_update_count" didn't change by 1.
Expected: 1
  Actual: 3
2017-02-03 04:04:02 -06:00
evazion
e98e7f1ea7 Fix note_update_count increment test.
5) Failure:
NoteTest#test_: In all cases updating a note should increment the updater's note_update_count. [/home/danbooru/src/danbooru/test/unit/note_test.rb:113]:
"CurrentUser.note_update_count" didn't change by 1.
Expected: 1
  Actual: 0
2017-02-03 04:03:44 -06:00
evazion
43086634cf hotkeys: fix shift+r => mark forum as read.
Also fix issue with a note handler being rebound instead of unbound.
2017-02-03 03:48:22 -06:00
evazion
d71136ce72 Disable left/right for prev/next page on /posts/:id.
Interferes with horizontal scrolling of wide images.
2017-02-03 03:40:32 -06:00
Albert Yi
7a05af657a Merge pull request #2871 from evazion/feat-filetype-metatag
Add filetype: metatag.
2017-02-02 11:44:33 -08:00
evazion
50b793d129 Don't send failed uploads to IQDB (possible fix for #2867). 2017-02-02 01:26:59 -06:00
evazion
558e4e5443 Add filetype: metatag. 2017-02-02 00:53:56 -06:00
r888888888
cee6a8331a bug fix for janitor trial mailer 2017-02-01 10:49:59 -08:00
Type-kun
8848fa2e2f Fixes #2861 2017-01-27 20:08:43 +05:00
Type-kun
1d25d1315a Fix comment search bugs (secondary ordering, non-bumping typo) 2017-01-27 14:12:16 +05:00
r888888888
8a93fdf18f additional saved search fixes 2017-01-25 12:48:47 -08:00
r888888888
1207faa600 fix tests 2017-01-24 16:05:06 -08:00