Commit Graph

7415 Commits

Author SHA1 Message Date
Neil Williams
9305d2fc68 media providers: Allow "content" to be an open file-like object. 2016-04-19 08:42:40 -07:00
Brian Simpson
26d42cc44a Subreddit.get_all_mod_ids: Use SRMember._simple_query
All we want are the _thing2_ids, so don't bother looking up the
full SRMember object.
2016-04-18 16:08:52 -07:00
Brian Simpson
1c7d458c87 UserRel: Use Relation._simple_query for ids/reverse_ids
These queries only want _thing1_id or _thing2_id so skip the step
of building the full Relation object.
2016-04-18 16:08:46 -07:00
Brian Simpson
5ca1fd4757 Relation: Add support for queries returning only specified props
This lets us retrieve the props in the `select` and avoid the
full _byID lookup when we really want just a list of
`_thing1_id`s for instance.
2016-04-18 16:08:46 -07:00
Brian Simpson
745d12eed7 Results.fetchone: Special case handling of Storage objects
Storage inherits from dict so it implements __iter__. This causes tup()
to think it's an iterable when really it's not.
2016-04-18 16:08:40 -07:00
Kevin O'Connor
df36fc7efa Add is_first_party method to OAuth2Client. 2016-04-18 14:16:55 -07:00
birakattack
e4433a84d9 Fix margin inconsistencies in post sharing form
Made margins and padding consistent (20px) for the post sharing form.
Fixed flex positioning to accommodate intended design.
2016-04-18 10:35:22 -07:00
Lev Alexandrovich Neiman
7591899295 Utils: Add import time 2016-04-14 14:50:58 -07:00
Lev Alexandrovich Neiman
4c1040341c Add rate_limiter and rate_limited_generator 2016-04-14 14:33:11 -07:00
Shawn Krisman
2ab855b4e0 removed extra post parameters from the remove stylesheet POST. 2016-04-14 14:11:27 -07:00
Brian Simpson
d451952013 new_vote: Don't queue a commentstree_q update on every vote
When a comment has received enough votes it will only update periodically.
2016-04-12 11:52:44 -07:00
Brian Simpson
b40b47a8ee run_commentstree: Increase batch size to 400
This should increase the likelihood that comments from the same
link will get grouped together and help the consumers keep up with
high mutation rates.
2016-04-12 11:52:38 -07:00
Brian Simpson
bdce812757 POST_del: Don't update CommentTree
The previous action was a no-op.
2016-04-12 11:52:34 -07:00
Brian Simpson
2085dc1e40 write_comment_orders: cleanup comments 2016-04-12 11:52:29 -07:00
Brian Simpson
78da2bfcc6 get_comment_scores: Write missing scores once per minute 2016-04-12 11:52:24 -07:00
Brian Simpson
361017543a add_comments: Add back event on comment_tree_inconsistent
Also cleanup the error logging and explanatory comment.
2016-04-12 11:52:18 -07:00
Brian Simpson
9cb1937621 get_comment_scores: Don't queue CommentTree updates for missing scores 2016-04-12 11:52:07 -07:00
Brian Simpson
71ad357947 add_comments: Don't rebuild inconsistent CommentTrees 2016-04-12 11:52:02 -07:00
Brian Simpson
91542f3f7f Thing: Count lookups with and without data 2016-04-11 14:38:34 -07:00
Brian Simpson
8b3174e217 Thing._byID: return early if no ids 2016-04-11 14:38:29 -07:00
Brian Simpson
a49f4f09b3 Thing: count cache write events
We were already tracking creates in the same namespace in tdb_sql.make_thing.
Modify, incr, create, and cache miss all cause Thing to be written to cache.
Tracking these events will let us understand how we're using the cache.
2016-04-11 14:36:39 -07:00
Chad Birch
04c341e433 Footer updates for mobile apps/site
* Replace Alien Blue link with new official apps
* Change "mobile beta" to "mobile website"
* Remove link to /about/team page
2016-04-11 12:12:15 -06:00
powerlanguage
abe9759a02 Add values link to footer. 2016-04-11 12:11:57 -06:00
Chris Slowe
9e0a0dccec Fix eventcollector tests. 2016-04-08 16:25:05 -07:00
Chris Slowe
b9fcc7c556 Add httpagentparser and add parsed UA to events. 2016-04-08 15:56:10 -07:00
Daniel Ellis
7b27e5bccf mobile: Fix link issue in message about gold.
The new mobile applications do not handle relative URLs.
2016-04-08 13:38:34 -07:00
Chris Slowe
fe1ea0bcae Add character set determination as part of the event pipeline. 2016-04-07 14:36:00 -07:00
Chad Birch
bc232e0c23 POST_block: prevent blocking yourself 2016-04-06 13:44:12 -06:00
Chad Birch
024f188bbe POST_block: fix inbox-check loophole for mods
The "is this item in the user's inbox?" check is supposed to be skipped
if the item is a modmail to a subreddit that the user moderates, but the
previous implementation of it also allowed mods to block from any
comment in a subreddit the user moderates.

This change updates the check to make sure that it's a message as well.
2016-04-06 13:44:09 -06:00
Chris Slowe
6c9a28e6bd Anti-Evil: extend user blocking to affect comments and links.
Specific features (and test list!)

-  [x] no user page visibility (display intersitial instead)
-  [X] links in listings removed by default (disabled for moderators)
-  [X] comments in listings/trees removed by default (disabled for moderators)
-  [X] can't reply to blocked (existing behavior -- retested here)
-  [X] block button on messages (existing behavior -- retested here)
-  [X] add block button on comment and post replies
-  [X] messages: no orangered or inbox
-  [X] self posts replies: no orangered or inbox
-  [X] self posts comments: no orangered or inbox
-  [X] /message/messages/ has no blocked users (comments, post replies, or comment replies)
-  [X] /message/inbox has no blocked users (comments, post replies, or comment replies)
-  [X] /messages/unread has no blocked users (comments, post replies, or comment replies)
-  [X] /comments has no blocked users
-  [X] messaging events for PMs (was just mod mail)
-  [X] messaging events have with blocked field
-  [x] spam messages don't show up
-  [x] no orangereds to oneself
-  [x] update production.ini to add `events_collector_message_sample_rate`
2016-04-05 21:01:44 -07:00
13steinj
b04c6f42b9 Add author flair placeholders to automoderator
As requested and reminded [here](https://www.reddit.com/r/ModSupport/comments/4bz7xg/an_icon_for_1_day_old_accounts/d1e4f1k), adds placeholders for the author's flair css class and text.

Defaults to an empty string if the attribute is missing (they don't a flair).
2016-04-05 16:44:52 -06:00
13steinj
117d7f06d6 Only show AutoMod link in modtools if it's enabled
The button as it stands shows up on local installs, even if automod
is not enabled.

This makes the button only show up if an automod account has been set.
2016-04-05 16:44:48 -06:00
13steinj
118106e5fb GET_morechildren: remove duplicate ids from children 2016-04-05 11:35:48 -07:00
Lev Neiman
35c82a0a0b Voting: Store IP's organization name 2016-03-31 16:02:54 -07:00
Brian Simpson
061ccbf214 MessageController: set source render_param correctly 2016-03-30 16:58:36 -07:00
Brian Simpson
960aafd0ae Message.can_view_slow: User can see a message if they received the first 2016-03-30 16:52:21 -07:00
Lev Neiman
9a20dc6416 Show IP address' organization on user account page 2016-03-30 14:02:11 -07:00
umbrae
cba11ddf68 Sidebar: Add hook for new sidebar button 2016-03-29 10:27:01 -07:00
umbrae
955a06fd78 Ban message: update warning to reminder
This was causing confusion about who this reminder was coming from.
2016-03-29 10:26:56 -07:00
umbrae
e99c5d9a9a Experiments: Add persistent A/A to vote endpoint 2016-03-29 10:26:49 -07:00
Matt Lee
1140109cb8 media: Feature flag scraper changes
It's important to know that any link posted in the test subreddit will use
the cached results if it's url has been scraped before, and any link posted
*outside* of the test subreddit will do the same, so any tests done here will
leak out if reposted elsewhere on the site.
2016-03-28 17:50:57 -04:00
Matt Lee
ee89b8ea4d Scraper: Convert imgur gif urls to gifv for scraping 2016-03-28 17:50:57 -04:00
Matt Lee
2dac6a26f1 Scraper: Add YouTube scraper 2016-03-28 17:50:57 -04:00
Jack Ward
239649429b Allow resize property in CSS filter
A CSS property supported by most browsers.
See https://drafts.csswg.org/css-ui-3/#resize
2016-03-28 12:02:53 -07:00
Lev Neiman
ae687a6d9f Vagrant: Update Ubuntu Image 2016-03-24 15:11:46 -07:00
Chris Slowe
512ec9dd6f Decode loid cookies on screenview events
Also stop extra-quoting them on the backend. Apparently, pylons already quotes cookies on the way out, leading to some cooke being doubly escaped. Correspondingly, aggressively decode loidcreated in JS to counteract any badly-formed cookies.
2016-03-20 21:51:15 -07:00
Chad Birch
b0c8f424d9 Scraper og:image check: handle no content attr
The thumbnail scraper is crashing on unusual og:image tags, when they
don't have a content= attribute. Example from the wild:

<meta property="og:image">

This just gets rid of the assumption that the attr will be there, so
that it can carry on finding a thumbnail as normal if an unusual tag is
encountered.
2016-03-17 16:36:50 -06:00
powerlanguage
c0ae5a25d8 Remove references to gold partners. 2016-03-17 13:12:47 -06:00
Chad Birch
c39ba57796 Lumen API: don't send AUTHENTICATION_TOKEN header
Lumen is making some changes to the way they check for authentication
tokens in API requests. Instead of updating this header, we're just
going to remove it since it was already unnecessary to be sending (since
our auth token is being sent in the JSON data).
2016-03-17 12:50:58 -06:00
Chad Birch
754b4bff99 Thumbnail scraper: handle EXIF Orientation tags
This adds support for EXIF Orientation tags to the thumbnail scraper.
Information about the tag and meaning of its values from
http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
2016-03-17 12:50:54 -06:00