Commit Graph

465 Commits

Author SHA1 Message Date
r888888888
2584646017 add additional formatting for delayed job listing 2016-12-24 18:00:40 -08:00
evazion
5302b804f1 Fix #2779: Erroneous pixiv_id parsed for novel/background/profile images 2016-12-04 02:04:44 -06:00
Albert Yi
7aab50f726 remove old iqdb code 2016-12-02 13:21:56 -08:00
Albert Yi
ebedea99c1 fix urls for iqdb service 2016-11-30 15:20:26 -08:00
Albert Yi
428d4689d6 stub in support for iqdbs 2016-11-28 17:14:25 -08:00
Albert Yi
8ccc7c2251 Merge pull request #2777 from evazion/feat-normalize-yandere-sources
Normalize yande.re sources from image URL -> html page URL.
2016-11-28 12:03:40 -08:00
evazion
f9aeb875db Normalize yande.re sources from image URL -> html page URL. 2016-11-28 05:04:02 -06:00
evazion
0697af6d23 Fix #2771: Approving deleted image doesn't create mod action. 2016-11-28 02:50:07 -06:00
evazion
f02a31a447 Autotag character_(cosplay) -> character, cosplay.
Make e.g. hatsune_miku_(cosplay) automatically add hatsune_miku and cosplay.

Perform autotagging after aliasing so that *_(cosplay) aliases (e.g.
hestia_(dungeon)_(cosplay) -> hestia_(danmachi)_(cosplay)) can take
effect first.
2016-11-04 23:37:28 -05:00
Albert Yi
91793fff82 fixes #2731: Expunged posts should clear favorite groups 2016-11-01 13:44:36 -07:00
Albert Yi
2dbb869188 keep track of post approvals to prevent approval cycles 2016-10-31 17:51:44 -07:00
Albert Yi
60eebd9608 fix chaining of hidden_attributes/method_attributes 2016-10-27 14:53:25 -07:00
evazion
8672604ee7 Add upvote:/downvote: editing metatags. 2016-10-26 23:23:47 -05:00
evazion
8b5aac7808 Add locked:{notes,status,rating} editing metatags (fix #1716). 2016-10-26 23:23:09 -05:00
Albert Yi
79842f7a3b restrict min level constraints for forum topics to mod+admin and restrict options based on current user's level. check privileges for visiblity in forum posts and topics. deprecate serializable_hash (undocumented, internal) for as_json, refactor to use hidden_attributes and method_attributes #2658 2016-10-25 15:05:55 -07:00
Albert Yi
f158e10c37 Merge pull request #2734 from evazion/fix-negated-aliases
Resolve aliases when removing negated tags (fix #2730)
2016-10-24 12:21:21 -07:00
evazion
c6294d5dfd Resolve aliases when removing negated tags (fix #2730). 2016-10-21 23:39:35 -05:00
evazion
07921d2c88 Make rating:s obey rate locks; make source:blah update pixiv id.
Move normalize_tags (which processes metatags) from before_save to
before_validation. This is so that it runs as early as possible, before
strip_source / parse_pixiv_ids / updater_can_change_rating, so these
callbacks can handle source/rating changes from metatags.

Fixes a couple bugs:

* Ratings locks were ignored when using rating:s metatag (regression in 0006b76)
* Pixiv ids weren't updated when using source:blah metatag.

Note: this means that `post.update_attribute(:tag_string => "art:bkub)`
is now wrong. This is because update_attribute runs callbacks but not
validations, so it doesn't process metatags from the tag string.
`update` or `update_attributes` must be used instead.
2016-10-21 19:59:02 -05:00
evazion
899f008c1d Reorganize Post callbacks into calling order.
Reorder callbacks into the same order Rails runs them in:

* before_validation
* validate
* before_save
* before_create
* after_create
* after_save
* after_commit

This doesn't change the behavior of anything, it simply rearranges
callbacks so their running order is less confusing.
2016-10-21 19:59:01 -05:00
evazion
0006b76c4d Always obey rating locks; make rerating locked posts an error.
Currently rating locks are only obeyed when using the rating: metatag.
They aren't obeyed when:

* Changing the rating via the API.
* Changing the rating via 'Rate Safe' in the mode menu (uses the API).
* Reverting to previous versions.

Also, the current behavior is to ignore the rating: metatag if the post
is locked. This patch instead makes the update fail completely (note that
this could affect trying to mass revert posts that may be rating locked).

Note: the check for `!is_rating_locked_changed?` is so that

  PUT /posts/1.json?post[rating]=s&post[is_rating_locked]=true

works (ie., locking and changing the rating at the same time is okay).
2016-10-19 20:06:43 -05:00
evazion
c01e03b193 Validate post ratings.
Prevent ratings from being set to invalid values via the API:

    PUT /posts/1.json?post[rating]=Z
2016-10-19 20:06:43 -05:00
evazion
c46b31aa9c Prevent reverting to foreign versions (fixes #2711). 2016-10-11 06:57:46 +00:00
evazion
3838167dc0 Post#unvote!: Return correct score (fixes #2709).
vote.destroy sets the score in the database but not on the in-memory
post. So just reload the post from the db to get the updated score,
don't duplicate the logic of setting it again.
2016-10-08 09:07:41 +00:00
evazion
ab5fd48280 Prevent mass assignment to Post#last_noted_at (#2704). 2016-10-06 09:39:57 +00:00
evazion
d38e83cd00 Refactor Post#parse_pixiv_id to use illust_id_from_url (fix #2695).
* Make illust_id_from_url a public class method instead of a protected
  instance method so that Post#parse_pixiv_id can use it.
* Also make illust_id_from_url swallow the exception that
  illust_id_from_url! throws so that parse_pixiv_id can use it.
2016-10-03 02:29:45 +00:00
Type-kun
02b8f37515 Allow source:"text with spaces", also allow source: for post edit 2016-09-19 19:33:21 +05:00
Type-kun
62773852f7 Add automatic APNG detection (#2237) 2016-09-08 00:48:39 +05:00
r888888888
52a2add18c add check if google apis are enabled 2016-08-22 16:10:20 -07:00
r888888888
0a65302f12 remove uniqueness constraint on postupdates 2016-08-22 16:09:20 -07:00
r888888888
3c42df51c9 add framework for post update pushes to pubsub 2016-08-19 17:51:47 -07:00
r888888888
28aa7f30d5 disable pubsub 2016-08-13 10:35:38 -07:00
r888888888
a55aa73b25 remove debugging 2016-08-12 13:35:11 -07:00
r888888888
1974db27b6 consolidate update_column calls on posts 2016-08-12 13:34:02 -07:00
r888888888
ba5e43d127 updated rules about self artwork 2016-08-12 11:39:55 -07:00
r888888888
7026e11adc fixes #2623: bugs with art commentary tags 2016-07-28 15:53:23 -07:00
r888888888
5cd1a34700 add google pubsub integration 2016-07-27 17:20:48 -07:00
r888888888
35a6f60dc4 add options for modifying commentary/commentary_request tags on form #2623 2016-07-19 16:49:19 -07:00
r888888888
37bc7279e3 fixes #2622: Create a source normalization rule for the HTTPS version of pixiv.net 2016-07-18 17:18:56 -07:00
r888888888
917e42ed29 when merging post versions, delete old version rather than updating it 2016-06-29 14:47:32 -07:00
r888888888
681fc62f06 change seo tag boundary to __ 2016-06-21 13:24:26 -07:00
r888888888
145229c49f cache essential tag string for an hour 2016-06-20 14:45:22 -07:00
r888888888
bdd408952b add user option for disabling tagged filenames 2016-05-26 10:16:13 -07:00
r888888888
ba65ec3e18 improve seo tagging, update nginx config file 2016-05-23 17:05:23 -07:00
r888888888
a90750f5e1 add tags to post file urls 2016-05-23 12:10:06 -07:00
r888888888
0b214a834b call postgres notify after any post change 2016-05-06 16:49:36 -07:00
r888888888
1d727e1269 fixes #2594: IQDB index stays the same after expunge 2016-05-03 12:20:31 -07:00
r888888888
51e77dbb9c favoriting upvotes only if you are gold 2016-03-14 16:21:23 -07:00
r888888888
c4b196ac8b add tag info to newrelic timeout errors 2016-03-10 11:02:26 -08:00
r888888888
d27807c23a store supervoter scores in post vote score 2016-02-24 14:35:07 -08:00
r888888888
bb3eb9f980 favoriting now triggers an upvote 2016-02-22 17:02:15 -08:00