Commit Graph

1496 Commits

Author SHA1 Message Date
bsimpson63
23bb2f16fa Run queries.ban on all spam things so spam_filtered will update. 2012-07-12 14:21:46 -04:00
shlurbee
c012ff81c8 Enable subreddit discovery spotlight ads
Checks to see if there's a field called sr_discovery_links in the .ini file
and, if there is, mixes those links in with rising links in the spotlight.
Promoted links are still inserted as before.

Example of what the .ini file entry would look like:
sr_discovery_links = t6_hq, t6_hr, t6_hs
2012-07-11 14:45:11 -07:00
shlurbee
eaa3b808d1 Fix "what's this" help link in spotlight
When the user clicks "what's this?" we query the dom with .thing:visible to
find out what kind of link is being displayed so we know which blurb to show.
However, we were calling hide() on the link before doing the query, which
meant it didn't match the .thing:visible filter and we were always falling back
to the default.

This fixes a bug where we were showing the rising links help blurb when the
user clicked "what's this?" on a promoted link.
2012-07-11 14:43:25 -07:00
Keith Mitchell
fa629e92c9 Show reddit search "facets"
If search results contain hits from more than one subreddit,
the top 20 will be selectable to click through and narrow
results
2012-07-11 14:31:57 -07:00
bsimpson63
3c0c27fab3 Don't use self.totals if it doesn't exist (day traffic issue). 2012-07-10 17:16:02 -04:00
bsimpson63
ba7e3516e4 CL ONE for ModAction lookups. 2012-07-10 17:16:01 -04:00
bsimpson63
9b9db8fb12 Add subreddit query for unmoderated links. 2012-07-10 17:16:01 -04:00
Neil Williams
6db4e82ac8 Use CL ONE for Cassandra Save/Hide lookups.
Looking up saves and hides generally results in a big multi-get that'll
end up hitting most of the ring. During load spikes this is a big issue.
Let's try reducing the CL to reduce load.
2012-07-10 17:16:01 -04:00
Jonathan M Tran
9ed1f8cc0f Fix for error 500 being thrown at registration 2012-07-09 13:17:19 -07:00
Neil Williams
1f951aadc0 Gracefully degrade when cassarel lookups fail.
The relation lookups currently do a multiget that will likely end up
hitting every node in the ring, until this can be fixed they are very
susceptible to load spikes. Rather than losing the whole request and
returning a 500/YBR to the user, if one of these lookups fail, we'll
just plow on.
2012-07-09 13:17:19 -07:00
Neil Williams
e2f3dba37f setup.py: Ensure webhelpers==0.6.4.
Newer webhelpers packages cause issues with Routes.
2012-07-09 13:17:19 -07:00
Neil Williams
4ba3b66834 setup.py: Add missing lxml dependency.
filters.py depends on lxml. This dependency was missing.
2012-07-09 13:17:19 -07:00
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