Commit Graph

550 Commits

Author SHA1 Message Date
Neil Williams
40eedd012d Add --proctitle to paster run.
When the setproctitle module is available and --proctitle is passed,
paster run will set the process title (as seen by ps, top, etc.) to the
specified value.
2011-07-22 11:18:55 -07:00
Neil Williams
ddc3bafee0 Move SubredditPopularityByLanguage to models. 2011-07-21 16:05:10 -07:00
Neil Williams
f8efeb60f3 Update to pycassa 1.1.0 for 0.8 compatibility. 2011-07-19 15:38:14 -07:00
Brian Simpson
f8c21e4f7d Remove the ability for mods to approve a deleted link. This prevents the deleted
then approved link from becoming visible.
2011-07-19 14:40:14 -07:00
Neil Williams
165c3d12d6 Remove unnecessary conditions from some queries.
PG9 doesn't like the query from _load_link_comments
in comment_tree.py.

thing.py will automatically filter deleted and spam items
out of thing queries if no rules are specified for those
columns. To get around this, some queries, including the
_load_link_comments one, will specify a rule
like _spam == (True, False). This rule was left in the ruleset,
despite the fact that it's completely unnecessary from the
SQL's standpoint. Its presence then triggered the need of a
join against the thing table when only the data table was
truly necessary. The query planner in PG9 doesn't like this
particular query when it requires a join and will force a
full table scan as a result.

This patch notes the special case of _spam/_deleted ==
(True,False) and turns off the default filtering but removes
the rules from the query. This saves some WHERE clauses
and more importantly removes the need for a JOIN in queries
like this one.
2011-07-19 12:23:14 -07:00
Brian Simpson
da9736a8b2 Hide NSFW links from logged in under 18 users. 2011-07-16 17:40:58 -07:00
Zeno
8f5ed2a9c5 Make "Hide posts if liked" ignore your own posts. 2011-07-13 10:19:16 -07:00
Logan Hanks
537a2bab67 Fix the param names in top/controversial listings. 2011-07-12 10:17:42 -07:00
Erik Karulf
83058d48ce Use constant-time string comparison for auth. 2011-07-11 16:05:10 -07:00
Logan Hanks
9344853401 ControversyTimeMenu needs to use POST, too. 2011-07-11 14:30:17 -07:00
Logan Hanks
f957e00539 Fix search and user sort selector bug. 2011-07-07 22:00:01 -07:00
Logan Hanks
f4b7dc641f Convert SimpleGetMenu to SimplePostMenu.
Fixes issue 118.

The original approach to menus/navbuttons would commit changes to user
preferences as a side effect of validation during a GET request. The new
approach now is to add a POST handler with the same exact validation that
just trivially redirects to the GET url. NavButton links are now hidden
form submits, and the VMenu validator will now only commit preference
changes on POST requests.
2011-07-07 16:30:38 -07:00
Keith Mitchell
826f004ef8 Give FriendList its container_name function back 2011-07-07 14:41:06 -07:00
Keith Mitchell
14b38b70eb Block a little less when blocking user
* User name shows up in PMs
* Message indicates that one should unblock the user if they
    want to see the PM
2011-07-07 14:41:06 -07:00
Keith Mitchell
b7df2c3d4c Only allow 'block user' from PMs 2011-07-07 14:41:06 -07:00
Keith Mitchell
3fb84ad3ef Fix spelling of VMessageRecipient class 2011-07-07 14:41:06 -07:00
Keith Mitchell
b2c0a12140 Add comment explaining use of orangered keyword 2011-07-07 14:41:06 -07:00
Keith Mitchell
4d7a2fa4e0 Allow users to block users that harass them
When you block a user:
* If they reply to a comment/post, you do NOT receive an orangered, and
* see NOTHING in your inbox.
* If they PM you, you do NOT receive an orangered, but the PM WILL show
* up in your inbox, with all fields replaced with the text "[blocked]".
* It's not readily possible to keep it out of the inbox while leaving it
* in the sender's sent box; and it needs to be in the sent box so that
* they can't tell that you've blocked them.
* You may not PM or make a comment reply to a user that you've blocked.
* This is to prevent abuse of the system by pre-emptively blocking a
* user and then sending them a series of harassment messages.

At present, the only way to block a user is from your inbox; if they PM
you or make a comment reply. There is a new "block user" button.
Unblocking a user can be done via /prefs/friends. This is to keep
'blocks' from being used commonly; in general, we prefer to encourage
the use of the downvote arrow for bad comments, and leave user-blocking
for true harassment scenarios.
2011-07-07 14:41:05 -07:00
Zach McCullough
2088628965 replaced the last instance of star.png with shield.png 2011-07-07 14:41:05 -07:00
Max Goodman
f9067c07f5 Fix an assumption in the ad check to handle AdBlock for Chrome.
This fixes the bug where the submit page initializes unsuccessfully,
causing link posts to be accidentally submitted as text posts.
2011-06-30 14:46:50 -07:00
Jason Harvey
9fc8e5ec92 Remove PG load balancing.
We're moving to a different solution internally and
it's not helpful to smaller sites.
2011-06-30 13:32:41 -07:00
Paradox
8543989d35 Swapped star for shield.png 2011-06-28 17:42:24 -07:00
Max Goodman
2d0481fb14 Enable mako template change monitoring when g.debug == True. 2011-06-28 12:31:07 -07:00
Max Goodman
7d591a48f3 Simplify JS usage in templates and move jQuery into js.py.
When g.uncompressedJS is true, an unminified version of jQuery will now
be loaded.
2011-06-28 12:31:07 -07:00
Max Goodman
9f7659dcf7 Add reddit toolbar to the privileged request check. 2011-06-28 12:26:28 -07:00
Keith Mitchell
94c4ceec40 User receives orangered when replying to their own post/comment. 2011-06-28 10:43:52 -07:00
Neil Williams
fa8135d8b0 Move sr_pops to its own CF.
Make sure to run scripts/update_reddits.sh after
updating to this revision to fill the new column
family with data.
2011-06-27 15:46:38 -07:00
Neil Williams
2cc640e708 Move subreddit name search to its own CF.
Subreddit name search is used for recommending
subreddits to users as they type a name on the
submission page.

Also adds a missing script that is needed
to load up the subreddit names into cassandra.
This script should be run occasionally (we do it
once per day) to fill/update the search cache.
2011-06-27 15:40:46 -07:00
Neil Williams
352d29a32e Make CL configurable per CF. 2011-06-27 15:19:08 -07:00
Neil Williams
8758abec07 Add missing pickle import to tdb_cassandra. 2011-06-27 15:19:03 -07:00
Keith Mitchell
e68b4456a4 Make password reset emails store information in hardcache
Password reset links now stored in the hardcache (they will exist
until the expiration, and never get evicted). Additionally,
if the password reset link has expired, the user will be
redirected to reddit.com/password?expired=true, with an error
message prompting them to try again.
2011-06-22 15:33:26 -07:00
Keith Mitchell
7a0d21e2e0 Delete password reset from hardcache after it's been used 2011-06-22 15:33:20 -07:00
Max Goodman
7f16403582 Make the NSFW warning tag subtler, pass 2. 2011-06-21 18:34:38 -07:00
Logan Hanks
5b9de9cb48 Update link.num_comments on comment post again.
It turns out that this commit to psql takes too long, causing backlog in
the comments_tree queue.
2011-06-21 15:21:33 -07:00
Max Goodman
959c3aa207 Lighten up the NSFW warning badge. 2011-06-21 14:55:30 -07:00
Max Goodman
628f92af9d Prevent static file name linking from operating on symlinks. 2011-06-21 14:55:30 -07:00
Zeno
83a3e09716 Improve error response when attempting to register a deleted name. 2011-06-21 14:55:30 -07:00
Max Goodman
ff11ed4ab8 Improve the appearance of the NSFW warning badge. 2011-06-21 14:55:30 -07:00
Max Goodman
26931c2097 Prevent flat light toggle buttons from word-wrapping. 2011-06-21 14:55:30 -07:00
Zeno
db209928a3 Add moderator-controllable NSFW marking to posts. 2011-06-21 14:55:30 -07:00
Max Goodman
04be215974 Use <time> element with a title attribute for comments and submissions.
Based on a commit by Zeno <zenomcdohl@gmail.com>.
2011-06-21 14:55:18 -07:00
Logan Hanks
5fd545393a Don't count deletions of already-deleted comments. 2011-06-20 16:28:15 -07:00
Brian Simpson
51bcbfbc97 Method _key_from_url() now returns case sensitive results for special domains (e.g. imgur.com, youtube.com). They are defined as case_sensitive_domains in the .ini file 2011-06-20 16:07:28 -07:00
Chris Johnson
1b030c310d Added option to hide user profile from robots. 2011-06-20 15:48:56 -07:00
Logan Hanks
49637884b8 Fix voting when template_debug=true.
Remove leading/trailing whitespace from thing_css_class for printables.
Fixes #85.
2011-06-20 14:39:16 -07:00
Logan Hanks
fd02caf035 Make comment count maintenance more transactional.
Move comment (re)counting for links to comment_tree.py. This should help
make comment counts more consistent. Fixes #44, fixes #60.
2011-06-20 14:31:53 -07:00
Neil Williams
06f4b9eccf Use [removed] instead of [deleted] for expunged. 2011-06-20 13:45:39 -07:00
Neil Williams
d99dece64b Honor selftext-expunging in JSON API. 2011-06-20 13:45:24 -07:00
Neil Williams
8d7f4f253d "reddit: the front page of the internet" 2011-06-20 13:44:33 -07:00
Max Goodman
e0099cd68e Add names.json to the gitignore. 2011-06-20 12:13:45 -07:00