Allow comments on old promoted links.

This commit is contained in:
bsimpson63
2012-10-10 12:19:17 -04:00
committed by Neil Williams
parent 9d97503ccb
commit 840cea6067
3 changed files with 3 additions and 3 deletions

View File

@@ -1037,7 +1037,7 @@ class ApiController(RedditController, OAuth2ResourceController):
or not sr.should_ratelimit(c.user, 'comment')):
should_ratelimit = False
parent_age = c.start_time - parent._date
if parent_age.days > g.REPLY_AGE_LIMIT:
if not link.promoted and parent_age.days > g.REPLY_AGE_LIMIT:
c.errors.add(errors.TOO_OLD, field = "parent")
#remove the ratelimit error if the user's karma is high

View File

@@ -306,7 +306,7 @@ class FrontController(RedditController, OAuth2ResourceController):
display = False
if not comment:
age = c.start_time - article._date
if age.days < g.REPLY_AGE_LIMIT:
if article.promoted or age.days < g.REPLY_AGE_LIMIT:
display = True
displayPane.append(UserText(item = article, creating = True,
post_form = 'comment',

View File

@@ -799,7 +799,7 @@ class Comment(Thing, Printable):
item.can_reply = False
if c.can_reply or (item.sr_id in can_reply_srs):
age = datetime.now(g.tz) - item._date
if age.days < g.REPLY_AGE_LIMIT:
if item.link.promoted or age.days < g.REPLY_AGE_LIMIT:
item.can_reply = True