Changeset 487 for trunk/lib/FormValidator.inc.php
- Timestamp:
- Aug 20, 2014 11:56:27 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FormValidator.inc.php
r484 r487 595 595 } 596 596 } 597 /** 598 * Check whether a file was selected for uploading. If file is missing, it's an error. 599 * 600 * @param string $form_name the name of the incoming form variable 601 * @param string $msg the message to display on error 602 * 603 * @return bool true if no errors found, false otherwise 604 */ 605 public function fileUploadSize($form_name, $msg='') 606 { 607 if (Validator::fileUploadSize($form_name)) { 608 return true; 609 } else { 610 $msg = '' == $msg ? sprintf(_("Maximum filesize exceeded. Got %s, but limit is %s."), humanFileSize($_SERVER['CONTENT_LENGTH']), humanFileSize(phpIniGetBytes('upload_max_filesize'))) : $msg; 611 $this->addError($form_name, $msg); 612 return false; 613 } 614 } 597 615 598 616 } // THE END
Note: See TracChangeset
for help on using the changeset viewer.