Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
This commit is contained in:
commit
a5b9f59cb2
|
@ -96,12 +96,6 @@ class LeavegroupAction extends Action
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -275,10 +275,8 @@ class ShowgroupAction extends Action
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
if ($cur) {
|
if ($cur) {
|
||||||
if ($cur->isMember($this->group)) {
|
if ($cur->isMember($this->group)) {
|
||||||
if (!$cur->isAdmin($this->group)) {
|
$lf = new LeaveForm($this, $this->group);
|
||||||
$lf = new LeaveForm($this, $this->group);
|
$lf->show();
|
||||||
$lf->show();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$jf = new JoinForm($this, $this->group);
|
$jf = new JoinForm($this, $this->group);
|
||||||
$jf->show();
|
$jf->show();
|
||||||
|
|
|
@ -234,7 +234,7 @@ class Notice extends Memcached_DataObject
|
||||||
$notice->content = $content;
|
$notice->content = $content;
|
||||||
$notice->whereAdd('now() - created < ' . common_config('notice', 'dupelimit'));
|
$notice->whereAdd('now() - created < ' . common_config('notice', 'dupelimit'));
|
||||||
$cnt = $notice->count();
|
$cnt = $notice->count();
|
||||||
return ($cnt > 0);
|
return ($cnt == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function checkEditThrottle($profile_id) {
|
static function checkEditThrottle($profile_id) {
|
||||||
|
|
|
@ -164,10 +164,8 @@ class GroupList extends Widget
|
||||||
# XXX: special-case for user looking at own
|
# XXX: special-case for user looking at own
|
||||||
# subscriptions page
|
# subscriptions page
|
||||||
if ($user->isMember($this->group)) {
|
if ($user->isMember($this->group)) {
|
||||||
if (!$user->isAdmin($this->group)) {
|
$lf = new LeaveForm($this->out, $this->group);
|
||||||
$lf = new LeaveForm($this->out, $this->group);
|
$lf->show();
|
||||||
$lf->show();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$jf = new JoinForm($this->out, $this->group);
|
$jf = new JoinForm($this->out, $this->group);
|
||||||
$jf->show();
|
$jf->show();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user