Merge branch 'master' of git@github.com:plainblack/webgui
Conflicts: docs/changelog/7.x.x.txt
This commit is contained in:
commit
90e3cd6b6f
6 changed files with 62 additions and 6 deletions
|
|
@ -2999,10 +2999,10 @@ sub www_editSave {
|
|||
my $isNewAsset = $session->form->process("assetId") eq "new" ? 1 : 0;
|
||||
return $session->privilege->locked() if (!$self->canEditIfLocked and !$isNewAsset);
|
||||
return $session->privilege->insufficient() unless $self->canEdit && $session->form->validToken;
|
||||
if ($self->session->config("maximumAssets")) {
|
||||
if ($self->session->config->get("maximumAssets")) {
|
||||
my ($count) = $self->session->db->quickArray("select count(*) from asset");
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset");
|
||||
return $self->session->style->userStyle($i18n->get("over max assets")) if ($self->session->config("maximumAssets") <= $count);
|
||||
return $self->session->style->userStyle($i18n->get("over max assets")) if ( $self->session->config->get("maximumAssets") <= $count && $isNewAsset );
|
||||
}
|
||||
my $object;
|
||||
if ($isNewAsset) {
|
||||
|
|
|
|||
|
|
@ -380,7 +380,6 @@ sub delete {
|
|||
my $userId = $self->userId;
|
||||
my $session = $self->session;
|
||||
my $db = $session->db;
|
||||
$self->uncache;
|
||||
|
||||
foreach my $groupId ( @{ $self->getGroups } ) {
|
||||
my $group = WebGUI::Group->new($session, $groupId);
|
||||
|
|
@ -429,6 +428,7 @@ sub delete {
|
|||
$credit->purge;
|
||||
|
||||
# remove user itself
|
||||
$self->uncache;
|
||||
$db->write("DELETE FROM userProfileData WHERE userId=?",[$userId]);
|
||||
$db->write("DELETE FROM users WHERE userId=?",[$userId]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue