AndyB
Well-known member
I would like to modify this code so that any registered member can edit poll questions. Once I can do that I will be able to make a check to verify it's the thread starter and no votes have been cast yet.
Thank you.
/library/Xenforo/Model/Thread.php
Line 1274
Thank you.
/library/Xenforo/Model/Thread.php
Line 1274
PHP:
public function canEditPoll(array $thread, array $forum, &$errorPhraseKey = '', array $nodePermissions = null, array $viewingUser = null)
{
// TODO: allow limited editing by starter (no votes, can add new responses, etc)
$this->standardizeViewingUserReferenceForNode($thread['node_id'], $viewingUser, $nodePermissions);
return ($viewingUser['user_id'] && XenForo_Permission::hasContentPermission($nodePermissions, 'manageAnyThread'));
}