Merge pull request #4675 from annando/group-delete
Fix: Groups can now be deleted again
This commit is contained in:
commit
9665f4ed41
|
@ -40,7 +40,7 @@ class Group extends BaseObject
|
||||||
// was restricted to this group may now be seen by the new group members.
|
// was restricted to this group may now be seen by the new group members.
|
||||||
$group = dba::selectFirst('group', ['deleted'], ['id' => $gid]);
|
$group = dba::selectFirst('group', ['deleted'], ['id' => $gid]);
|
||||||
if (DBM::is_result($group) && $group['deleted']) {
|
if (DBM::is_result($group) && $group['deleted']) {
|
||||||
dba::update('group', ['deleted' => 0], ['gid' => $gid]);
|
dba::update('group', ['deleted' => 0], ['id' => $gid]);
|
||||||
notice(L10n::t('A deleted group with this name was revived. Existing item permissions <strong>may</strong> apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL);
|
notice(L10n::t('A deleted group with this name was revived. Existing item permissions <strong>may</strong> apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -138,7 +138,7 @@ class Group extends BaseObject
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$group = dba::selectFirst('group', ['uid'], ['gid' => $gid]);
|
$group = dba::selectFirst('group', ['uid'], ['id' => $gid]);
|
||||||
if (!DBM::is_result($group)) {
|
if (!DBM::is_result($group)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue