| @@ 513-519 (lines=7) @@ | ||
| 510 | ); |
|
| 511 | ||
| 512 | // Validation: File extensions |
|
| 513 | if ($allowedExtensions = $this->getAllowedExtensions()) { |
|
| 514 | $config['acceptFileTypes'] = '(\.|\/)(' . implode('|', $allowedExtensions) . ')$'; |
|
| 515 | $config['errorMessages']['acceptFileTypes'] = _t( |
|
| 516 | 'File.INVALIDEXTENSIONSHORT', |
|
| 517 | 'Extension is not allowed' |
|
| 518 | ); |
|
| 519 | } |
|
| 520 | ||
| 521 | // Validation: File size |
|
| 522 | if ($allowedMaxFileSize = $this->getValidator()->getAllowedMaxFileSize()) { |
|
| @@ 957-963 (lines=7) @@ | ||
| 954 | ); |
|
| 955 | ||
| 956 | // Validation: File extensions |
|
| 957 | if ($allowedExtensions = $this->getAllowedExtensions()) { |
|
| 958 | $config['acceptFileTypes'] = '(\.|\/)(' . implode('|', $allowedExtensions) . ')$'; |
|
| 959 | $config['errorMessages']['acceptFileTypes'] = _t( |
|
| 960 | 'File.INVALIDEXTENSIONSHORT', |
|
| 961 | 'Extension is not allowed' |
|
| 962 | ); |
|
| 963 | } |
|
| 964 | ||
| 965 | // Validation: File size |
|
| 966 | if ($allowedMaxFileSize = $this->getValidator()->getAllowedMaxFileSize()) { |
|