Commit Graph

5386 Commits

Author SHA1 Message Date
Keith Mitchell
18240366df /dev/api: Document additional endpoints
* sticky
* sidebar
* related
* duplicates

Are now lightly documented on /dev/api.
2015-02-04 15:50:01 -08:00
Jordan Milne
436281f88e Fix link generation on oauth.
When on `foo.oauth.reddit.com`, we want to generate links like
`foo.reddit.com`
2015-02-04 11:27:30 -08:00
KeenRivals
d6358c7484 Losslessly reduced PNGs with Optipng and Advancecomp. Only PNGs that were referenced in less files that were not commented as sprites were reduced. 2015-02-03 06:16:59 -08:00
Florence Yeun
817aecef1a Disable voting when page is in read only mode
Voting should not be available when a page is in read only or heavy load mode.
This prevents a blank modal from appearing when voting on a post or comment.
2015-02-03 15:15:28 -08:00
Brian Simpson
36f437a79a Add CommentVisitsByUser model for storing comments page visits. 2015-02-03 05:25:26 -05:00
Brian Simpson
31e9bb434a Clean up comment_visits method. 2015-02-03 05:25:19 -05:00
Jordan Milne
9f4a561489 Consider non-www. reserved subdomains part of the domains prefix
This helps with some cache poisoning where we'd end up with www.
links on beta. and vice versa. This also retains existing behaviour
where something like "en.www." == "en.", "en.en." == "en.", and
"json." == ""
2015-02-03 13:21:26 -08:00
Chad Birch
8fcf4bf699 Mod report reasons: don't try to translate
Seems to have been an accidental call left to _() inside the title of
report reasons made by moderators, which was causing an error.
2015-02-03 14:04:34 -07:00
Jordan Milne
b1dbd3071d Handle allocation failures in C code gracefully
Thanks to Nathanael A. Hoyle for the report! Some of these may have
been exploitable due to pointer arithmetic before reads / writes.
Just bail out if we can't allocate.
2015-02-02 16:07:13 -08:00
Brian Simpson
b2e9903b8d Send user's IP address when creating an authorization hold.
Hopefully this helps trigger some of Authorize.net's fraud detection.
2015-02-02 16:58:29 -05:00
Brian Simpson
8128b5737f CreateCustomerProfileTransactionRequest.__init__: remove dead code. 2015-02-02 16:58:29 -05:00
Brian Simpson
70ea33f302 Delete some authorize.net transaction types we don't use. 2015-02-02 16:58:29 -05:00
Brian Simpson
b3bf278cb3 authorize: Delete unused ShippingAddress stuff. 2015-02-02 16:58:24 -05:00
Matt Lee
0b0872743f selfserve: Fix sponsor domain override .
When the new promo form went from being a normal ajax call to a multipart form, it
stopped using the 'post_pseudo_form' method.  That method ignored inputs with the
'gray' class applied, which was being used for displaying the 'optional' placeholder
string.  This was probably created before there was widespread support for the
placeholder html attribute.
2015-01-30 11:59:31 -08:00
Matt Lee
ad99451f63 markdown: Update markdown styles.
+ Add horizontal padding to gold-highlighted comments
+ Restore blockquote indent
+ Darken blockquote and del element text
+ Darken blockquote border and hr element
+ Increase font size of reply textarea to match comment font size
+ Fix alignment of messages
+ Restore green text to sent modmail
+ Fix code elements having a much smaller font size in Chrome
+ Increase left spacing on lists to prevent ol list numbers from being cropped.
+ Make code blocks have white background when on non-white backgrounds.

Conflicts:
	r2/r2/public/static/css/markdown.less
2015-01-30 11:59:06 -08:00
Brian Simpson
f558033c96 selfserve: Allow thumbnail upload on new_promo page.
Add the POST_create_promo endpoint and validator for posting a multipart form.  The
form is posted to a hidden iframe on the page, which then relays the jquery response
back to the parent frame.
2015-01-30 11:57:21 -08:00
Brian Simpson
4db92f5b73 promotecontroller: clean up POST_link_thumb. 2015-01-30 11:57:20 -08:00
Matt Lee
3fca431e3c markdown: Swap feature flags to enable access to old markdown styles. 2015-01-30 11:56:38 -08:00
Matt Lee
29df0ad506 selfserve: Return to first page when changing sort on sponsor/promoted/ listing.
Currently, if you navigate to the second page of links then change the sort type, you'll
get no results back.  This is because it is carrying over the 'after' query param.  This
drops the query params for all of the sort options _except_ the one you are currently
on, so that changing it will always kick you back to page 1.
2015-01-30 11:55:56 -08:00
Matt Lee
04363d781a selfserve: Change 'bid' to 'spend' on edit_promo page.
from Dylan:

We haven't used "bids" for 18 months or so, can probably substitute "Spend History" and
"Spend" in place of the two instances of bid. Doesn't really matter for people that are
familiar with the system, but as we bring new people on it may be confusing.
2015-01-30 11:55:40 -08:00
Matt Lee
8e654fbb89 Add es5-sham to reddit-init-legacy.
es5-shim only adds polyfills for es5 methods whose behavior can be faithfully
emulated in legacy javascript engines.  es5-sham adds stubs and partial support
for additional es5 methods (e.g. Object.freeze) with the goal of preventing
runtime errors.

react-with-addons.js uses some of these methods, and as such breaks on old IE.
The 'shams' work perfectly fine for it.
2015-01-30 11:55:00 -08:00
Chad Birch
fef95e3642 Highlight new comments: enable for mods 2015-01-30 12:42:46 -07:00
Chad Birch
3216377cbc Comment limit: allow mods to use reddit gold limit 2015-01-30 12:42:38 -07:00
angrypotato1
4a90ec013f Add a link to sidebar in .compact header. 2015-01-30 14:36:02 -05:00
Michele
83a58d5a34 /api/morechildren is now a GET 2015-01-30 10:03:59 -08:00
MelissaCole
d000b421a5 Use account object for cancel_stripe_subscription 2015-01-30 09:54:48 -08:00
Neil Williams
a42ff99c52 vote: Stop dual-writing to postgres.
This is the final step in the saga of the pg vote rel destruction. We've
been dual-writing to PG and C* while gaining confidence in the pure-C*
model being able to survive full load.  This kills the pgvote databases
and moves forward in a pure-cassandra world for votes which should save
us considerable operational headaches.  After rolling this out, we can
not switch back without considerable effort.

When he reached the New World, Cortez burned his relational databases.
As a result his queue processors were well motivated.
2015-01-29 12:15:31 -08:00
MelissaCole
1470b29b6b Pass account obj to cancel_stripe_subscr 2015-01-29 11:20:21 -08:00
powerlanguage
ec0e5a89a4 Simplify contact page. 2015-01-29 11:19:31 -08:00
powerlanguage
6f06e5af82 Update jobs link in footer. 2015-01-29 11:19:24 -08:00
MelissaCole
a6721055d3 Cancel subscription or warn on account delete
If a user has a Stripe subscription, we can delete the customer when the
account is deleted. If there's a paypal subscription, a link to paypal will
be shown to remind the user to cancel the subscription.
2015-01-29 11:19:16 -08:00
Keith Mitchell
b57d0679df HSTS redirects: Avoid redirecting with extensions 2015-01-28 16:15:40 -08:00
Brian Simpson
85f79ef889 PromoteReport: optionally group by date. 2015-01-27 05:06:11 -05:00
Brian Simpson
a2945ff64d Add campaign summary table to sponsor view of review listings.
Previously sponsors had to go to the edit_promo page for each link
they were reviewing. Adding the summary table to the link listing
shows them all the information they need to accept or reject the ad.
2015-01-27 01:43:41 -05:00
Neil Williams
387aca5af3 Remove search feedback feature.
It is currently unused and is one of the remaining hardcache clients.
2015-01-26 12:53:13 -08:00
Neil Williams
3aeeb42c07 vote: Start reading from C* for vote_q processing.
This cuts primary reads over to VoteDetailsBy{Link,Comment} instead of
Postgres for determining if the vote being processed is overwriting a
previous vote or not.

Postgres is kept up to date in case we need to fall back.
2015-01-26 12:53:13 -08:00
MelissaCole
4176f33021 Account for no secret in reverse_gold_purchase
Secret was removed for recurring Stripe calls. To see if it's a recurring
subscription, we can see if a subscr_id exists.
2015-01-23 11:30:50 -08:00
Chad Birch
88a05fd3d2 Ban page: add note about message and unhide fields 2015-01-23 10:38:16 -08:00
Chad Birch
52b4be0749 Prevent ban with custom message that will not send
A user will only be sent a ban notification if either of the following
is true:

1. they are subscribed to the subreddit
2. they have ever gained or lost karma (of any type) in the subreddit

Because of these conditions, there is some confusion in cases where
moderators ban someone that has made a post that didn't yet receive any
votes, where they still expect the user to receive a ban message and be
able to see the reason for the ban that they requested to include in it.

This commit makes it so that including a custom reason is not possible
in a case where the message won't actually be sent, to prevent that
confusion.
2015-01-23 10:38:04 -08:00
Chad Birch
214445df8f Exempt admins from subreddit image upload limit 2015-01-23 10:37:58 -08:00
Chad Birch
dcd25c1cca Remove GET_bookmarklet endpoint 2015-01-23 10:37:49 -08:00
MelissaCole
a6cfd627e0 Clear secret if subscr_id already exists
Currently all subscriptions (new or recurring) have a secret (autorenew-).
To make it easier to find which type of payment it is, this will clear the
secret if this is a recurring subscription (which is the same structure
paypal takes).
2015-01-22 14:05:28 -08:00
MelissaCole
ee0682ad26 Fix stripe secret being nulled when renewed 2015-01-22 14:05:23 -08:00
MelissaCole
8ef7766336 Add customer.card.updated to event type (noop) 2015-01-22 14:05:17 -08:00
Brian Simpson
45bc8b09f5 modlog: Fix showing of subreddit name when in a multireddit. 2015-01-22 15:13:35 -05:00
Brian Simpson
dbb7935bf8 Enable per-user global selfserve cpm override.
Setting Account.selfserve_cpm_override_pennies will let the user create
campaigns with ANY targeting at that price.
2015-01-22 15:13:24 -05:00
Brian Simpson
a6c1d2e81f Allow custom pricing for location targets. 2015-01-22 15:13:20 -05:00
Brian Simpson
df8f3e4ccc PromotionWeights.add: Use map not filter to fix names. 2015-01-17 02:27:54 -05:00
Brian Simpson
b38a087072 PromotionWeights: improve object creation and deletion. 2015-01-17 02:27:45 -05:00
Brian Simpson
4c37d92bbe Clarify wording when a user initiates a thumbnail rescrape.
Previously it could seem like the browser will get notified when complete.
2015-01-16 03:23:24 -05:00