Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x

This commit is contained in:
CiaranG 2009-03-08 09:25:23 +00:00
commit a5b9f59cb2
4 changed files with 5 additions and 15 deletions

View File

@ -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;
}

View File

@ -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();

View File

@ -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) {

View File

@ -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();