diff --git a/actions/leavegroup.php b/actions/leavegroup.php index 1d85aa3d52..eb30d0e505 100644 --- a/actions/leavegroup.php +++ b/actions/leavegroup.php @@ -96,12 +96,6 @@ class LeavegroupAction extends Action return false; } - if ($cur->isAdmin($this->group)) { - $this->clientError(_('You may not leave a group while you are its administrator.'), 403); - return false; - - } - return true; } diff --git a/actions/showgroup.php b/actions/showgroup.php index c20941a35e..b6022840bf 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -275,10 +275,8 @@ class ShowgroupAction extends Action $cur = common_current_user(); if ($cur) { if ($cur->isMember($this->group)) { - if (!$cur->isAdmin($this->group)) { - $lf = new LeaveForm($this, $this->group); - $lf->show(); - } + $lf = new LeaveForm($this, $this->group); + $lf->show(); } else { $jf = new JoinForm($this, $this->group); $jf->show(); diff --git a/classes/Notice.php b/classes/Notice.php index eac90ce95b..ac4db944f2 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -234,7 +234,7 @@ class Notice extends Memcached_DataObject $notice->content = $content; $notice->whereAdd('now() - created < ' . common_config('notice', 'dupelimit')); $cnt = $notice->count(); - return ($cnt > 0); + return ($cnt == 0); } static function checkEditThrottle($profile_id) { diff --git a/lib/grouplist.php b/lib/grouplist.php index 8e2637fec9..1b85474998 100644 --- a/lib/grouplist.php +++ b/lib/grouplist.php @@ -164,10 +164,8 @@ class GroupList extends Widget # XXX: special-case for user looking at own # subscriptions page if ($user->isMember($this->group)) { - if (!$user->isAdmin($this->group)) { - $lf = new LeaveForm($this->out, $this->group); - $lf->show(); - } + $lf = new LeaveForm($this->out, $this->group); + $lf->show(); } else { $jf = new JoinForm($this->out, $this->group); $jf->show();