mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 15:58:06 -05:00
fix blog link in footer; add padding to footer; add to subreddit subscriptions;
This commit is contained in:
@@ -1205,7 +1205,10 @@ class ApiController(RedditController):
|
||||
action = VOneOf('action', ('sub', 'unsub')),
|
||||
sr = VByName('sr'))
|
||||
def POST_subscribe(self, action, sr):
|
||||
self._subscribe(sr, action == 'sub')
|
||||
# only users who can make edits are allowed to subscribe.
|
||||
# Anyone can leave.
|
||||
if action != 'sub' or sr.can_comment(c.user):
|
||||
self._subscribe(sr, action == 'sub')
|
||||
|
||||
def _subscribe(self, sr, sub):
|
||||
Subreddit.subscribe_defaults(c.user)
|
||||
|
||||
@@ -20,21 +20,16 @@
|
||||
# CondeNet, Inc. All Rights Reserved.
|
||||
################################################################################
|
||||
from reddit_base import RedditController, proxyurl
|
||||
from r2.lib.template_helpers import get_domain
|
||||
from r2.lib.pages import Embed, BoringPage, HelpPage
|
||||
from r2.lib.filters import websafe, SC_OFF, SC_ON
|
||||
from pylons.i18n import _
|
||||
from pylons import request
|
||||
from pylons import c
|
||||
from pylons import c, g, request
|
||||
|
||||
from BeautifulSoup import BeautifulSoup, Tag
|
||||
|
||||
from urllib2 import HTTPError
|
||||
|
||||
def force_redirect(dest):
|
||||
def _force_redirect(self, *a, **kw):
|
||||
return self.redirect(dest)
|
||||
return _force_redirect
|
||||
|
||||
class EmbedController(RedditController):
|
||||
def rendercontent(self, input, fp):
|
||||
soup = BeautifulSoup(input)
|
||||
@@ -84,3 +79,8 @@ class EmbedController(RedditController):
|
||||
return self.abort404()
|
||||
|
||||
GET_help = POST_help = renderurl
|
||||
|
||||
def GET_blog(self):
|
||||
return self.redirect("http://blog.%s/" %
|
||||
get_domain(cname = False, subreddit = False,
|
||||
no_www = True))
|
||||
|
||||
@@ -977,6 +977,7 @@ textarea.gray { color: gray; }
|
||||
|
||||
/* footer */
|
||||
.footer-parent {
|
||||
padding-top: 40px;
|
||||
clear: both;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user