fix problems with gallery URLs. fixed disk space check. added error messages to photo template
This commit is contained in:
parent
5b467483f5
commit
58417faf8a
9 changed files with 84 additions and 2 deletions
|
|
@ -653,9 +653,15 @@ sub processCommentEditForm {
|
|||
|
||||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
my $i18n = __PACKAGE__->i18n( $self->session );
|
||||
my $form = $self->session->form;
|
||||
my $errors = $self->SUPER::processPropertiesFromFormPost || [];
|
||||
|
||||
# Make sure we have the disk space for this
|
||||
if ( !$self->getGallery->hasSpaceAvailable( $self->get( 'assetSize' ) ) ) {
|
||||
push @{ $errors }, $i18n->get( "error no space" );
|
||||
}
|
||||
|
||||
# Return if errors
|
||||
return $errors if @$errors;
|
||||
|
||||
|
|
@ -668,6 +674,11 @@ sub processPropertiesFromFormPost {
|
|||
} );
|
||||
}
|
||||
|
||||
# Fix URLs
|
||||
$self->update( {
|
||||
url => $self->getParent->get( "url" ) . '/' . $self->session->url->urlize( $self->get( "menuTitle" ) )
|
||||
} );
|
||||
|
||||
$self->requestAutoCommit;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue