Commit Graph

1484 Commits

Author SHA1 Message Date
Neil Williams
f50bab028d setup.py: Gracefully handle when Cython is not installed. 2012-07-09 13:17:19 -07:00
Neil Williams
dc10f7cedf setup.py: Add temporary Pycassa 1.7 download link.
reddit relies on pycassa/pycassa@91a5887def
but at time of writing there still isn't a release that contains this
patch. Until that's available, we'll add a custom download link.
2012-07-09 13:17:19 -07:00
shlurbee
60004f2ad5 Fix encoding and do escaping in authorize.net xml
- Escapes &, <, and > except in extraOptions tags, which need to allow special
    characters
- Encodes string as UTF-8 before sending it over the wire
- Replaces xml entities in responses with the correct chars

This change should fix some of the 500 server errors people were getting when
they had unusual characters in their payment info.
2012-07-06 14:31:36 -07:00
Neil Williams
77ba2db3fe Make POST_hide only allow Links through VByName.
Someone has been sending Comment fullnames to POST_hide and that
results in an error on our side and a 500 for them. They really
should be getting a proper error message back instead.
2012-07-06 14:29:36 -07:00
shlurbee
85f6b2a5c7 Validate lengths of self-serve payment address fields
Fixes a bug where customers were seeing a 500 error if they entered an address that was too long.
2012-07-06 14:29:24 -07:00
Neil Williams
dd96155bce tdb_sql: Optimistically do UPDATES and fall back to INSERTS.
Doing a SELECT on the data table to determine which keys already
exist was adding too much extra load to the Account master. This
attempts to alleviate that by optimistically trying an UPDATE and
if no rows were actually changed by the UPDATE, doing an INSERT
instead.
2012-06-28 15:45:05 -07:00
Neil Williams
7118bde472 Turn CNAMEs into a simple redirect. 2012-06-28 13:32:56 -07:00
Andre D
d0102d6a3c Compact navigation menus were sometimes losing subreddit 2012-06-28 10:46:50 -07:00
Neil Williams
38d792a6a7 Make sure to actually check CAPTCHAs on submit. 2012-06-28 10:46:50 -07:00
shlurbee
fd4662a34b Make is_charged_transaction safer
Returns False immediately if trans_id is 0 since this value means no record has
been created and therefore the transaction can't have been charged.
2012-06-27 10:07:11 -07:00
Andrew Shu
6f9f91e753 GH-407: "obey_over18" parameter to enable filtering of NSFW posts via API 2012-06-26 16:37:31 -07:00
Edho Arief
13feb89274 Also scrapes https pages. 2012-06-26 16:37:31 -07:00
bsimpson63
64d068529e whitespace 2012-06-26 16:37:31 -07:00
bsimpson63
e34c91205a Put link to tear sheet on edit_promo page. 2012-06-26 16:37:31 -07:00
bsimpson63
4e9e07b896 Add parameter to HotController to force display of a promotion. 2012-06-26 16:37:31 -07:00
bsimpson63
ce508b5d23 Add promote function to determine if a promotion is live. 2012-06-26 16:37:31 -07:00
bsimpson63
7529c509b7 Reorganize promote.
Functions charge_pending and get_scheduled used accepted_iter
decorator thing which obscured what they were doing. Removed unused
function get_scheduled_campaign.
2012-06-26 16:37:31 -07:00
Neil Williams
c215726f6e Add stats events for spam-related stuff. 2012-06-25 20:39:55 -07:00
Neil Williams
8da619dc1f Add stats.simple_event for simple stats counter increments. 2012-06-25 20:39:55 -07:00
Neil Williams
695b10f242 Add an AMQP message when composing. 2012-06-25 20:39:55 -07:00
bsimpson63
a68269176d Create a single ModAction when using flaircsv API. 2012-06-25 20:39:55 -07:00
bsimpson63
91b7856cb1 ModContribSR inherits from MultiReddit.
Now has get_all_comments method.
2012-06-25 20:39:55 -07:00
Neil Williams
1969aee170 Don't write Liked/Disliked timestamps.
We'll just use LinkVote instead. It'll be slightly
inaccurate for one of the two, but it'll be easier
to maintain.
2012-06-25 20:39:55 -07:00
bsimpson63
d9e9507b92 View method to return columns sorted by timestamp. 2012-06-25 20:39:55 -07:00
bsimpson63
05f4028bce Display comment's link, author, subreddit on editreddit listings. 2012-06-25 20:39:10 -07:00
Max Goodman
d0504d3848 Fix SpotlightListing to save max_num for spacing calculation.
The max_num property is used to calculate the width for the .rank
element so that listing items line up. This was getting overwritten by
Listing.listing(), causing the spotlight items to not line up with the
rest of the page.
2012-06-25 17:37:06 -07:00
Max Goodman
aedc271b15 Make next/prev buttons prettier and larger targets. 2012-06-25 17:37:06 -07:00
Max Goodman
b78b43bb60 Line up spotlight box content with main listing. 2012-06-25 17:37:06 -07:00
Max Goodman
b20c080491 Fix clipping on compressed link vote arrows. 2012-06-25 17:37:06 -07:00
Neil Williams
d579592ea7 Track in graphite new Cassandra connections being opened. 2012-06-22 23:33:41 -07:00
Max Goodman
42c4e91f3a Redirect old-style link details page URLs. 2012-06-20 11:45:57 -07:00
Max Goodman
ce6b2ca6b1 Version hosted jQuery file. 2012-06-20 11:45:57 -07:00
Max Goodman
499f0ad010 Upgrade to jQuery 1.7.2. 2012-06-20 11:45:57 -07:00
shlurbee
76c546f521 Use default traffic weight when there's no data
Returns the default weight of 1 if there's only one day's worth of traffic data
since otherwise the weigh function would throw a divide by zero error.
2012-06-20 11:23:42 -07:00
Neil Williams
35445f1194 Remove ip_and_slash16 which was causing issues for IPv6. 2012-06-20 11:23:29 -07:00
shlurbee
26021aff5c In payments, make NO_TRANSACTION the only special transaction code
trans_id > 0 is used to identify an authorize transaction in many places in the
code and trans_id < 0 is used to identify freebies, so for now the only
"special" code is 0

(Also fixes problem with mark_payment_error since ERROR wasn't in the Enum)
2012-06-20 11:23:16 -07:00
Neil Williams
963bbbc05a Ack, remove double header on functions.sql. 2012-06-19 15:47:02 -07:00
Neil Williams
d8df30480a Update LICENSE. 2012-06-19 15:47:01 -07:00
Neil Williams
914b949286 Update / add license headers.
I'm actually quite excited to do this.
2012-06-19 14:02:42 -07:00
Neil Williams
ab3bde16e9 Remove some unused files. 2012-06-19 14:02:42 -07:00
Neil Williams
51376aa069 Remove unused recommender engine. 2012-06-19 14:02:42 -07:00
shlurbee
703c2c43d7 Let campaign go live immediately after approval
Now, if a campaign's start date has already passed, it will go live immediately
after approval instead of waiting until midnight the next day.

(It seems like this was already the intended behavior, but
make_daily_promotions() was having no effect because it only loads campaigns
that have already been charged.)
2012-06-18 17:20:17 -07:00
shlurbee
e40f390bc0 Update regexp for authorize duplicate customer error
Fixes the following bug:
A user was unable to authorize campaign because clicking Pay raised
an exception.

Cause:
The user's record was missing from the authorize_account_id table. Our code
has some logic to parse the customer id from the authorize error response when
this happens and rewrite the record, but the regexp was out of date.

This change updates the regexp to match the current authorize.net error msg
format and logs some info to make it easier to catch the problem if the format
changes again in the future.

Note:
- Why would a user record be missing in the first place? Should be looked into.
2012-06-18 17:20:08 -07:00
shlurbee
62aecb9acc Record trans_id for freebies in campaign things
Initial campiagn Thing writes were recording an enum value for freebie
campaigns but it actually is useful to include the transaction id (which is
negative for freebies) because it references the freebie's record in the
bid table.

Note: This commit also includes a one-off script for fixing the trans_id
in existing campaign things.
2012-06-18 17:19:56 -07:00
Keith Mitchell
768a664df8 Add another invalid search query code 2012-06-18 23:38:08 +01:00
Keith Mitchell
10301188aa NoneType has no attribute promoted 2012-06-18 23:38:01 +01:00
Keith Mitchell
bba4097d6b Remove invalid/completed TODOs 2012-06-18 23:37:39 +01:00
Keith Mitchell
973005d2df Remove references to deprecated Solr index 2012-06-18 23:37:31 +01:00
Keith Mitchell
3a6f9e6011 Stop sending updates to Solr 2012-06-18 23:34:58 +01:00
Neil Williams
e8a358008f Add mailmap to simplify commit history. 2012-06-18 15:13:56 -07:00