Don't allow voting on archived topics.

This commit is contained in:
Vikhyat Korrapati 2014-04-12 23:03:56 +05:30
parent 83b46a6b88
commit 31d95c295f

View File

@ -60,7 +60,7 @@ module ::PollPlugin
end
def is_closed?
@post.topic.closed? || (!SiteSetting.allow_user_locale? && (@post.topic.title =~ /^#{I18n.t('poll.closed_prefix')}/i) === 0)
@post.topic.closed? || @post.topic.archived? || (!SiteSetting.allow_user_locale? && (@post.topic.title =~ /^#{I18n.t('poll.closed_prefix')}/i) === 0)
end
def options