mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
share when not logged in/fix info redirect
This commit is contained in:
@@ -68,8 +68,8 @@ class FrontController(RedditController):
|
||||
|
||||
new_url = new_url + query_string(request.get)
|
||||
|
||||
# redirect should be smarter and handle extentions, etc.
|
||||
return self.redirect(new_url)
|
||||
# redirect should be smarter and handle extensions, etc.
|
||||
return self.redirect(new_url, code=301)
|
||||
|
||||
def GET_random(self):
|
||||
"""The Serendipity button"""
|
||||
|
||||
@@ -620,6 +620,10 @@ class VReason(Validator):
|
||||
fullname = reason[5:]
|
||||
t = Thing._by_fullname(fullname)
|
||||
return ('redirect', t.permalink)
|
||||
elif reason.startswith('share_'):
|
||||
fullname = reason[6:]
|
||||
t = Thing._by_fullname(fullname)
|
||||
return ('redirect', t.permalink)
|
||||
elif reason.startswith('reply_'):
|
||||
fullname = reason[6:]
|
||||
t = Thing._by_fullname(fullname)
|
||||
|
||||
@@ -151,6 +151,9 @@
|
||||
title = "comments on " + thing.title,
|
||||
newwindow = c.user.pref_newwindow)}
|
||||
</li>
|
||||
<li id="share_li_${fullname}">
|
||||
${parent.simple_button("share", fullname, _("share"), "share")}
|
||||
</li>
|
||||
%if c.user_is_loggedin:
|
||||
<li>
|
||||
%if thing.saved:
|
||||
@@ -173,11 +176,6 @@
|
||||
${parent.delete_or_report_buttons()}
|
||||
${parent.buttons()}
|
||||
${self.media_embed()}
|
||||
%if c.user_is_loggedin:
|
||||
<li id="share_li_${fullname}">
|
||||
${parent.simple_button("share", fullname, _("share"), "share")}
|
||||
</li>
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user