afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2010-01-20 04:08 pm

[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 [staff profile] denise.

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&amp;mode=open'>[ $ML{'.reopen'} ]</a> " :
             "<a href='$LJ::SITEROOT/poll/?id=$pollid&amp;mode=close'>[ $ML{'.close'} ]</a> ";
--------------------------------------------------------------------------------