/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/FEFile.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/FEFile.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jonen, Thu May 6 16:27:26 2004 UTC revision 1.3 by jonen, Thu Aug 11 14:09:59 2005 UTC
# Line 4  Line 4 
4   *   *
5   * $Id$   * $Id$
6   *   *
7   * @author Walter A. Boring IV <waboring@buildabetterweb.com>   * @author Walter A. Boring IV <waboring@newsblob.com>
8   * @author Dave Brondsema <dave@brondsema.net>   * @author Dave Brondsema <dave@brondsema.net>
9   * @package phpHtmlLib   * @package phpHtmlLib
10   * @subpackage FormProcessing   * @subpackage FormProcessing
# Line 80  class FEFile extends FEText { Line 80  class FEFile extends FEText {
80       * @param FormValidation object.       * @param FormValidation object.
81       */       */
82      function validate(&$_FormValidation) {      function validate(&$_FormValidation) {
83            
84            if (isset($_REQUEST[FORM_CONFIRM])) {
85                    //looks like we are in confirmation
86                    //we should have a populated array already.
87                    if ($this->_files_info['name']) {
88                            //we are ok
89                            return TRUE;                            
90                    } else {
91                            //something bogus happened here.
92                            $this->set_error_message("The uploaded file was unexpectedly empty.");
93                    return FALSE;                          
94                    }
95            }
96            
97          switch ($_FILES[$this->get_element_name()]['error']) {          switch ($_FILES[$this->get_element_name()]['error']) {
98          case 0:          case 0:
99              if ($_FILES[$this->get_element_name()]['size'] == 0) {              if ($_FILES[$this->get_element_name()]['size'] == 0) {
# Line 195  class FEFile extends FEText { Line 209  class FEFile extends FEText {
209       * @return array       * @return array
210       */       */
211      function get_file_info() {      function get_file_info() {
212          return $_FILES[$this->get_element_name()];          return @$_FILES[$this->get_element_name()];
213      }      }
214    
215      /**      /**

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed