X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowgroup.php;h=9a12bafaf62aba1b4ff763738f1125c558f8cf19;hb=aa80d8fee3865e25e8d47a5c83b6575ca3dc79ea;hp=3d369e9ebfbf7d46577be5ba3f0b31d559b76640;hpb=0b30230b5ad482b9510775510f77dbbc62970150;p=quix0rs-gnu-social.git diff --git a/actions/showgroup.php b/actions/showgroup.php index 3d369e9ebf..9a12bafaf6 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -316,6 +316,12 @@ class ShowgroupAction extends GroupDesignAction Event::handle('EndGroupSubscribe', array($this, $this->group)); } $this->elementEnd('li'); + if ($cur->hasRight(Right::DELETEGROUP)) { + $this->elementStart('li', 'entity_delete'); + $df = new DeleteGroupForm($this, $this->group); + $df->show(); + $this->elementEnd('li'); + } $this->elementEnd('ul'); $this->elementEnd('div'); } @@ -430,14 +436,6 @@ class ShowgroupAction extends GroupDesignAction function showStatistics() { - // XXX: WORM cache this - $members = $this->group->getMembers(); - $members_count = 0; - /** $member->count() doesn't work. */ - while ($members->fetch()) { - $members_count++; - } - $this->elementStart('div', array('id' => 'entity_statistics', 'class' => 'section')); @@ -451,7 +449,7 @@ class ShowgroupAction extends GroupDesignAction $this->elementStart('dl', 'entity_members'); $this->element('dt', null, _('Members')); - $this->element('dd', null, (is_int($members_count)) ? $members_count : '0'); + $this->element('dd', null, $this->group->getMemberCount()); $this->elementEnd('dl'); $this->elementEnd('div');