diff options
author | CiaranG <ciaran@ciarang.com> | 2009-03-08 09:25:23 +0000 |
---|---|---|
committer | CiaranG <ciaran@ciarang.com> | 2009-03-08 09:25:23 +0000 |
commit | a5b9f59cb235a05eaf74465d421508b4b8471488 (patch) | |
tree | ab1fcd6c19fe1eef6f30fae8dc8524fee2cf3dd7 | |
parent | 61940e37ff89710628eff1a4ad6db8df16142cec (diff) | |
parent | f66775658c0f231c8bcf9ea310fc8ac0dbf19bfd (diff) |
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
-rw-r--r-- | actions/leavegroup.php | 6 | ||||
-rw-r--r-- | actions/showgroup.php | 6 | ||||
-rw-r--r-- | classes/Notice.php | 2 | ||||
-rw-r--r-- | lib/grouplist.php | 6 |
4 files changed, 5 insertions, 15 deletions
diff --git a/actions/leavegroup.php b/actions/leavegroup.php index 1d85aa3d5..eb30d0e50 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 c20941a35..b6022840b 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 eac90ce95..ac4db944f 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 8e2637fec..1b8547499 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(); |