forked from reddit-archive/reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Discount 1.6.1 * Lines beginning with spaces are considered code. I don't know why markdown.py didn't trigger this. * tables in mark down: why not? * validation of resulting HTML vial libxml to prevent hax. * private RSS and JSON feeds * optional whitelists for subreddits * Moderator messaging Additions: * destination sanitization to cut down on XSRF * cosmetic fix to spam and reported listing * make the rss feeds on messages useful * /admin/errors * Of the types of listings hitting the precomputers (top/controversy by hour/day/week/month/year), the ones over long periods of time don't change often. So we can try to run them at most once per day, and then merge in the day's listings. * google analytics * logging queue * Created empty commentspanel.xml, errorpage.xml, login.xml * add subreddit rules/info box to submit page * add 'via' link on messages in moderator inbox * add a show=all get parameter to link listings to optionally ignore hiding preferences. * Raise edited timelimit to three mins * Remove UI that makes it look like you can edit deleted selftexts * Make it clearer to admins when a link is deleted * Fix [S] leak on deleted comments * Fix /user/[deleted] misrendering * New house ads system * updated so that minimalcontrollers actually can use the page cache. * Added /admin/usage Bugfixes: * Reduce the number of results that we request from Solr and simplify that caching a bit * Require a secret key to shut down app-servers * Make get_title a little more resilient to malformed documents and slow remote servers * Cause the SearchBuilder to only byID the results that it's going to render instead of all 1000 * Remove ability for an author to XSS himself * fix spam listings and an xsrf * More verbose VDestination * Fixing the famous ?limit=0.1 error, and one last password-validation one * distinguish deleted comments' and deleted links' error messages * Don't allow ridiculously long log lines to widen the page * Bug with HardCache.add() when existing key is expired * Add adminbox next to domain
- Loading branch information
1 parent
2869eaf
commit a402d48
Showing
204 changed files
with
18,568 additions
and
1,422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ r2/srcount.pickle | |
r2/myproduction.ini | ||
.DS_Store | ||
r2/r2.egg-info/** | ||
r2/r2/public/static/sprite.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# The contents of this file are subject to the Common Public Attribution | ||
# License Version 1.0. (the "License"); you may not use this file except in | ||
# compliance with the License. You may obtain a copy of the License at | ||
# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public | ||
# License Version 1.1, but Sections 14 and 15 have been added to cover use of | ||
# software over a computer network and provide for limited attribution for the | ||
# Original Developer. In addition, Exhibit A has been modified to be consistent | ||
# with Exhibit B. | ||
# | ||
# Software distributed under the License is distributed on an "AS IS" basis, | ||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for | ||
# the specific language governing rights and limitations under the License. | ||
# | ||
# The Original Code is Reddit. | ||
# | ||
# The Original Developer is the Initial Developer. The Initial Developer of the | ||
# Original Code is CondeNet, Inc. | ||
# | ||
# All portions of the code written by CondeNet are Copyright (c) 2006-2010 | ||
# CondeNet, Inc. All Rights Reserved. | ||
################################################################################ | ||
from pylons import request, g | ||
from reddit_base import RedditController | ||
from r2.lib.pages import AdminPage, AdminAds, AdminAdAssign, AdminAdSRs | ||
from validator import * | ||
|
||
class AdsController(RedditController): | ||
|
||
@validate(VSponsor()) | ||
def GET_index(self): | ||
res = AdminPage(content = AdminAds(), | ||
show_sidebar = False, | ||
title = 'ads').render() | ||
return res | ||
|
||
@validate(VSponsor(), | ||
ad = VAdByCodename('adcn')) | ||
def GET_assign(self, ad): | ||
if ad is None: | ||
abort(404, 'page not found') | ||
|
||
res = AdminPage(content = AdminAdAssign(ad), | ||
show_sidebar = False, | ||
title='assign an ad to a community').render() | ||
return res | ||
|
||
@validate(VSponsor(), | ||
ad = VAdByCodename('adcn')) | ||
def GET_srs(self, ad): | ||
if ad is None: | ||
abort(404, 'page not found') | ||
|
||
res = AdminPage(content = AdminAdSRs(ad), | ||
show_sidebar = False, | ||
title='ad srs').render() | ||
return res |
Oops, something went wrong.