Revision 45ea86a9
Von Werner Hahn vor fast 8 Jahren hinzugefügt
SL/Controller/ShopPart.pm | ||
---|---|---|
70 | 70 |
my ($self, %params) = @_; |
71 | 71 |
|
72 | 72 |
my $attributes = $::form->{ $::form->{form_prefix} } || die "Missing attributes"; |
73 |
$main::lxdebug->dump(0, 'WH: ATTRIBUTES: ', \$attributes); |
|
74 |
|
|
73 | 75 |
$attributes->{filename} = ((($::form->{ATTACHMENTS} || {})->{ $::form->{form_prefix} } || {})->{file_content} || {})->{filename}; |
74 | 76 |
|
75 | 77 |
my @errors; |
... | ... | |
103 | 105 |
} |
104 | 106 |
|
105 | 107 |
my @errors; |
108 |
my @type_error = SL::Controller::FileUploader->validate_filetype($attributes->{filename},$::form->{aft}); |
|
109 |
push @errors,@type_error if @type_error; |
|
106 | 110 |
$self->file->assign_attributes(%{ $attributes }); |
107 | 111 |
my @file_errors = $self->file->validate if $attributes->{file_content};; |
108 | 112 |
push @errors,@file_errors if @file_errors; |
109 | 113 |
|
110 |
my @type_error = SL::Controller::FileUploader->validate_filetype($attributes->{filename},$::form->{aft}); |
|
111 |
push @errors,@type_error if @type_error; |
|
112 | 114 |
|
113 | 115 |
return $self->js->error(@errors)->render($self) if @errors; |
114 | 116 |
|
Auch abrufbar als: Unified diff
mend