mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-14 01:18:15 -05:00
Replace incorrect arguments to plain_link in several places.
In several places we're passing sr_path and cname arguments, but the correct arguments are actually _sr_path and nocname. In these cases it doesn't appear to be actually causing any problems, but it's still wrong.
This commit is contained in:
@@ -39,8 +39,8 @@ ${parent.midcol(cls = cls)}
|
||||
</%def>
|
||||
|
||||
<%def name="subreddit()" buffered="True">
|
||||
${plain_link(thing.subreddit.name, thing.subreddit_path, sr_path=False,
|
||||
cname=False, _class="subreddit hover")}
|
||||
${plain_link(thing.subreddit.name, thing.subreddit_path, _sr_path=False,
|
||||
nocname=True, _class="subreddit hover")}
|
||||
</%def>
|
||||
|
||||
<%def name="link()" buffered="True">
|
||||
|
||||
@@ -163,8 +163,8 @@
|
||||
</%def>
|
||||
|
||||
<%def name="subreddit()" buffered="True">
|
||||
${plain_link('/r/' + thing.subreddit.name, thing.subreddit_path, sr_path = False,
|
||||
cname = False, _class = "subreddit hover may-blank")}
|
||||
${plain_link('/r/' + thing.subreddit.name, thing.subreddit_path, _sr_path=False,
|
||||
nocname=True, _class="subreddit hover may-blank")}
|
||||
</%def>
|
||||
|
||||
<%def name="midcol(display=True, cls = '')">
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
permalink = thing.target.make_permalink(thing.parent_link, thing.subreddit)
|
||||
%>
|
||||
${plain_link(text, permalink, title=title, sr_path=False, cname=False, _class="may-blank")} 
|
||||
${plain_link(text, permalink, title=title, _sr_path=False, nocname=True, _class="may-blank")} 
|
||||
%elif hasattr(thing, "target") and isinstance(thing.target, Link):
|
||||
<%
|
||||
title = _force_unicode(thing.target.title)
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
permalink = thing.target.make_permalink(thing.subreddit)
|
||||
%>
|
||||
${plain_link(text, permalink, title=title, sr_path=False, cname=False, _class="may-blank")} 
|
||||
${plain_link(text, permalink, title=title, _sr_path=False, nocname=True, _class="may-blank")} 
|
||||
%elif hasattr(thing, "wrapped_user_target"):
|
||||
${thing.wrapped_user_target} 
|
||||
%endif
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
${plain_link(
|
||||
thing.title,
|
||||
thing.permalink,
|
||||
sr_path=False,
|
||||
cname=False,
|
||||
_sr_path=False,
|
||||
nocname=True,
|
||||
_class='search-title may-blank',
|
||||
)}
|
||||
%if c.site.link_flair_position == 'right':
|
||||
@@ -94,8 +94,8 @@
|
||||
${plain_link(
|
||||
'%s %s' % (format_number(thing.num_comments), ungettext('comment', 'comments', thing.num_comments)),
|
||||
thing.permalink,
|
||||
sr_path=False,
|
||||
cname=False,
|
||||
_sr_path=False,
|
||||
nocname=True,
|
||||
_class="search-comments may-blank",
|
||||
)} 
|
||||
<span class="search-time">${_("submitted")} ${thing_timestamp(thing, thing.timesince, include_tense=True)}</span> 
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
${plain_link(
|
||||
thing.title,
|
||||
thing.search_path,
|
||||
sr_path=False,
|
||||
cname=False,
|
||||
_sr_path=False,
|
||||
nocname=True,
|
||||
_class='search-title may-blank',
|
||||
)}
|
||||
</%parent:search_result_header>
|
||||
@@ -56,8 +56,8 @@
|
||||
${plain_link(
|
||||
thing.path.rstrip('/'),
|
||||
thing.search_path,
|
||||
sr_path=False,
|
||||
cname=False,
|
||||
_sr_path=False,
|
||||
nocname=True,
|
||||
_class='search-subreddit-link may-blank',
|
||||
)} 
|
||||
%if not thing.score_hidden:
|
||||
@@ -82,8 +82,8 @@
|
||||
${plain_link(
|
||||
_("search within %(subreddit)s") % dict(subreddit=pretty_name),
|
||||
search_url(thing.prev_search, thing.name, restrict_sr='on', sort=thing.sort, recent=thing.recent),
|
||||
sr_path=False,
|
||||
cname=False,
|
||||
_sr_path=False,
|
||||
nocname=True,
|
||||
_class='search-link',
|
||||
title=_('search in %(subreddit)s' % dict(subreddit=pretty_name)),
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user