- Added an option for hosters to limit the number of assets that may be
created on a WebGUI site. fixed some bugs
This commit is contained in:
parent
9b7d160a7a
commit
5a7fedc731
6 changed files with 33 additions and 6 deletions
|
|
@ -1799,6 +1799,11 @@ NOTE: Don't try to override or overload this method. It won't work. What you are
|
|||
sub www_editSave {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
if ($self->session->config("maximumAssets")) {
|
||||
my ($count) = $self->session->db->quickArray("select count(*) from asset");
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset");
|
||||
$self->session->style->userStyle($i18n->get("over max assets")) if ($self->session->config("maximumAssets") <= $count);
|
||||
}
|
||||
my $object;
|
||||
if ($self->session->form->process("assetId") eq "new") {
|
||||
$object = $self->addChild({className=>$self->session->form->process("class")});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue