[dw-free] allow community maintainers to control polls
[commit: http://hg.dwscoalition.org/dw-free/rev/60ee7e5e2194]
http://bugs.dwscoalition.org/show_bug.cgi?id=2181
Poll owners and community maintainers can now both close polls in a
community.
Patch by
denise.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2181
Poll owners and community maintainers can now both close polls in a
community.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- htdocs/poll/index.bml
-------------------------------------------------------------------------------- diff -r 4a28a5ddda9c -r 60ee7e5e2194 htdocs/poll/index.bml --- a/htdocs/poll/index.bml Wed Jan 20 15:51:43 2010 +0000 +++ b/htdocs/poll/index.bml Wed Jan 20 16:07:48 2010 +0000 @@ -41,7 +41,7 @@ # Handle opening and closing of polls # We do this first because a closed poll will alter how a poll is displayed - if ($poll->is_owner($remote)) { + if ( $poll->is_owner( $remote ) || $remote && $remote->can_manage( $u ) ) { if ($FORM{'mode'} =~ /(close|open)/) { $mode = $FORM{'mode'}; $poll->close_poll if ($mode eq 'close'); @@ -74,7 +74,7 @@ $body .= "<a href='" . $entry->url . "'>[ $ML{'.discuss'} ]</a> "; # Links for closing/reopening polls - if ($poll->is_owner($remote)) { + if ( $poll->is_owner($remote) || $remote && $remote->can_manage( $u ) ) { $body .= $poll->is_closed ? "<a href='$LJ::SITEROOT/poll/?id=$pollid&mode=open'>[ $ML{'.reopen'} ]</a> " : "<a href='$LJ::SITEROOT/poll/?id=$pollid&mode=close'>[ $ML{'.close'} ]</a> "; --------------------------------------------------------------------------------