if (!can_moderate($vars['forumid'], 'canmanagethreads'))
if (!can_moderate($threadinfo['forumid'], 'canmanagethreads'))