Allow stickying link submissions

This commit is contained in:
Chad Birch
2015-07-09 13:31:58 -06:00
parent c4515bed4e
commit 62a74f8554
2 changed files with 3 additions and 3 deletions

View File

@@ -1538,7 +1538,7 @@ class ApiController(RedditController):
state=VBoolean('state'))
@api_doc(api_section.links_and_comments)
def POST_set_subreddit_sticky(self, form, jquery, thing, state):
"""Set or unset a self-post as the sticky post in its subreddit.
"""Set or unset a Link as the sticky in its subreddit.
`state` is a boolean that indicates whether to sticky or unsticky
this post - true to sticky, false to unsticky.
@@ -1547,7 +1547,7 @@ class ApiController(RedditController):
one will replace the previous one.
"""
if not isinstance(thing, Link) or not thing.is_self:
if not isinstance(thing, Link):
return
sr = thing.subreddit_slow

View File

@@ -107,7 +107,7 @@
%endif
%endif
%if thing.can_edit and thing.link.is_self:
%if thing.can_edit:
%if thing.stickied:
${ynbutton(_("unsticky this post"), _("unstickied"), "set_subreddit_sticky",
hidden_data=dict(id=thing.link._fullname, state=False))}