mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merged revisions 47623 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq ........ r47623 | ischommer | 2008-01-04 21:44:51 +1300 (Fri, 04 Jan 2008) | 1 line fixed extension checking ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52400 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ee179fe668
commit
1c929747ce
@ -162,6 +162,9 @@ class Upload extends Controller {
|
||||
* @return boolean
|
||||
*/
|
||||
public function validate($tmpFile) {
|
||||
// we don't validate for empty upload fields yet
|
||||
if(!isset($tmpFile['name']) || empty($tmpFile['name'])) return true;
|
||||
|
||||
$pathInfo = pathinfo($tmpFile['name']);
|
||||
// filesize validation
|
||||
if(!$this->isValidSize($tmpFile)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user