Commit Graph

2374 Commits

Author SHA1 Message Date
Kevin Kress
cd9318d2b0 Add a pylintrc for reddit's needs
Allows running pylint --rcfile pylintrc r2/ to get a list of potential
problems.
2012-12-31 14:07:55 -07:00
Bryce Boe
deb857f686 Show hidden submissions in moderator listings. 2012-12-31 14:07:45 -07:00
Ricky Ramirez
be5fb02d14 template_helpers: Point to /about/team for info on admins. 2012-12-28 11:28:26 -08:00
Neil Williams
bd03654eaf Revert "Apply a bandaid for _dirties being stuck in memcached."
This reverts commit a452422057fdcbeafe26fcbbff527bcc2be37d3d.
This reverts commit bac38fe3a41cd09643b37bad947f3b3a70d5784d.
2012-12-28 11:12:23 -08:00
Neil Williams
dda3ff1539 Make /r/lounge is_contributor not rely on overbloated rel.
The lounge is too popular! update_gold_users is crashing taking too long
to update the SRMember:contributor rel when users' gold expire. This
change makes it so that we don't actually need to maintain the rel to
maintain proper access control for the lounge.
2012-12-27 14:16:49 -08:00
Neil Williams
55a4968209 Apply a bandaid for _dirties being stuck in memcached. 2012-12-27 14:16:49 -08:00
Neil Williams
4fda0f9f4a plugins: Add hook for watching Thing commits. 2012-12-27 14:16:48 -08:00
Neil Williams
76594cdeb6 Refactor and reorganize email canonicalization; add some tests.
The email_attrs thing wasn't actually being used (`if False`) and so
I've removed it in the process.
2012-12-27 14:16:28 -08:00
Ricky Ramirez
9b66333c2e Remove "edit this page" tag for embedded trac wiki pages.
The trac wiki is now deprecated and content should be migrated to the new
integrated wiki.
2012-12-26 14:51:17 -08:00
Neil Williams
ac118cebd8 Be more thorough in sanitizing for add_request_info. 2012-12-26 14:06:51 -08:00
Neil Williams
bfa457c67f Fix bad ad URLs causing mistargeting.
c.site.path = /r/whatever/
c.site.name = whatever

"r/%s/" % c.site.name = "r//r/whatever//"
2012-12-21 11:29:02 -08:00
Roger Ostrander
6d21636a93 Fully rendered sidebars now at /r/foo/about/sidebar 2012-12-20 14:58:50 -08:00
Keith Mitchell
8df185c42b validators: Move from controllers to lib 2012-12-20 13:40:20 -08:00
Keith Mitchell
87b41c9d4b errors.py: Move from controllers -> lib
Since these are not directly related to controllers.
2012-12-20 13:40:14 -08:00
Keith Mitchell
7408668d18 Import proxyurl from the correct place 2012-12-20 13:40:09 -08:00
Keith Mitchell
4a8ebf411c Remove underused json_respond
This should help resolve a circular import wherein "import jsonresponse"
triggers "from r2.lib.pages.things import wrap_links" in jsonresponse.py,
which triggers "from pages import *" in r2/lib/pages/__init__.py, which
further triggers "from r2.lib.jsonresponse import json_respond" in pages.py
2012-12-20 13:40:00 -08:00
Keith Mitchell
6d6a0a1d08 reddit_base: Automated whitespace changes 2012-12-20 13:39:42 -08:00
Keith Mitchell
15817179d5 reddit_base: clean up imports 2012-12-20 13:39:36 -08:00
Neil Williams
d253daa907 Clean up and reorganize traffic-tracking code. 2012-12-19 15:26:02 -08:00
Ricky Ramirez
efee207552 Cleanup template_helpers.
Remove extra whitespace.
Fix typo hotname -> hostname.
2012-12-18 12:06:20 -08:00
Neil Williams
0e3c0a19a4 Allow ratelimited useragents to be a little more bursty.
This will allow ratelimited agents like Googlebot a little more leeway
when it comes to the API ratelimits.
2012-12-18 12:06:20 -08:00
Neil Williams
86e4532140 Remove extraneous outline from compact view as well. 2012-12-18 12:06:10 -08:00
Logan Hanks
c053d82883 Parse dsn param to get key for pg stats. 2012-12-17 13:27:15 -08:00
Pavel
46070df795 Remove outline added to vote arrows by accessibility patch. 2012-12-17 12:56:54 -08:00
Neil Williams
2ddfab7e69 Accessibility: Make vote arrows into buttons.
This adds three attributes to vote arrows:

* role="button" is part of ARIA and tells user agents that even though
  the vote arrow is a div, it's actually meant to be a button.
* aria-label, another part of ARIA, this tells user agents what to
  call the newly buttonized.
* tabindex, this makes the buttons able to receive keyboard focus so you
  tab through the document.
2012-12-17 12:23:25 -08:00
Neil Williams
25b5683222 Accessibility: Remove meaningless alt text.
It just gets in the way of screen readers.
2012-12-17 12:23:25 -08:00
Neil Williams
2beabad0cc Accessibility: Add ARIA landmarks.
These are the modern equivalent of the "jump to content" link.
2012-12-17 12:23:25 -08:00
Neil Williams
11bda59611 Set PostgreSQL application_name metadata.
This should allow us to collect more information on where lingering
transactions come from.

Note: this uses an undocumented feature of psycopg2 connection strings
to get around a limitation in the version of psycopg2 we're on. This is
resolved as of v2.4.3 of psycopg2.

http://archives.postgresql.org/psycopg/2011-11/msg00020.php
2012-12-17 12:23:25 -08:00
Neil Williams
102ef36b8b Entity-escape error response payload JSON.
This fixes a minor self-XSS in the Wiki editor for config/stylesheet and
should protect us against similar issues happening again in the future.

Thanks to @nealpoole for the disclosure.
2012-12-17 11:30:41 -08:00
Neil Williams
a74f609eee /comments/gilded: Set c.profilepage = True for "in subreddit" etc. 2012-12-14 15:33:28 -08:00
Logan Hanks
9379b08c9a Change CommentTree CF's key from a tuple of bigints to a tuple of longs. 2012-12-14 13:05:47 -08:00
Neil Williams
e028c35676 Add a new listing of gilded comments. 2012-12-14 12:52:36 -08:00
Neil Williams
c91374acc4 db_manager: Don't try writing to slaves for rels. 2012-12-14 12:52:36 -08:00
Neil Williams
eebb529e2c db_manager: PEP-8 Cleanups. 2012-12-14 12:52:36 -08:00
Neil Williams
2ef7985618 Revert "queries: Move /r/all/comments to new query cache (try 3)."
This reverts commit 13497f6f08.
2012-12-14 12:52:35 -08:00
Neil Williams
d6924c8bcc rss: Don't render invalid thumbnails for built-in sprited thumbs. 2012-12-14 11:57:47 -08:00
Neil Williams
06742f69b7 rss: Add atom:link rel="self" to RSS feeds.
This is recommended by the W3C RSS feed validator:

http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
2012-12-14 11:57:41 -08:00
Max Goodman
8ba1ef41d6 Update ToC styling to match new wrapper class. 2012-12-13 13:22:14 -08:00
Max Goodman
974d18479c Add "get" method to LiveConfig. 2012-12-13 13:22:14 -08:00
Max Goodman
b7e3727cde Add placeholder element and styling for ad frames. 2012-12-13 13:22:14 -08:00
Max Goodman
8b77613309 Parameterize the Ads template. 2012-12-13 13:22:14 -08:00
Keith Mitchell
78888f1373 Fix GET_subreddits_by_topic 2012-12-12 13:45:08 -08:00
Keith Mitchell
590eb25c0c Add simple date drop down to search 2012-12-12 13:45:04 -08:00
Andre D
a225d34a6f wiki: Move space replace into normalize. 2012-12-12 13:33:20 -08:00
Andre D
2bda185248 wiki: Clarify permissions language. 2012-12-12 13:33:20 -08:00
Andre D
bb5ef967fb wiki: Editing a wiki page requires it to exist. 2012-12-12 13:33:20 -08:00
Andre D
0a03256226 wiki: Ensure to normalize page name on create check. 2012-12-12 13:33:20 -08:00
Andre D
d332dc4410 wiki: Explicit check for a banned user. 2012-12-12 13:33:20 -08:00
Andre D
9417f111af wiki: Ensure you cannot create an empty page. 2012-12-12 13:33:20 -08:00
Andre D
ff3632482f wiki: Ensure people who are added to approved wiki may edit. 2012-12-12 13:33:20 -08:00