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:
Ingo Schommer 2008-04-09 11:13:24 +00:00
parent ee179fe668
commit 1c929747ce

View File

@ -162,6 +162,9 @@ class Upload extends Controller {
* @return boolean * @return boolean
*/ */
public function validate($tmpFile) { 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']); $pathInfo = pathinfo($tmpFile['name']);
// filesize validation // filesize validation
if(!$this->isValidSize($tmpFile)) { if(!$this->isValidSize($tmpFile)) {