- fixed bug 11997: maximumAssets is ignored
- fixed bug 11998: maximumAssets prevents editing existing assets if maximum is reached
This commit is contained in:
parent
e222cd97b6
commit
3d79b8b26c
2 changed files with 4 additions and 2 deletions
|
|
@ -2,6 +2,8 @@
|
|||
- added #11968: use the language override in the registration form (Jukka Raimovaara / Mentalhouse Oy)
|
||||
- Changed Carousel to use TinyMCE with WebGUI plugins
|
||||
- fixed #11984: No JS allows invalid dates in Event asset
|
||||
- fixed #11997: maximumAssets in config is ignored (Arjan Widlak / United Knowledge)
|
||||
- fixed #11998: maximumAssets affects not only new assets, but als prevents editing existing assets if maximum is reached
|
||||
|
||||
7.10.6
|
||||
- fixed #11974: Toolbar icons unclickable in Webkit using HTML5
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue