|
|
|
@ -1,32 +1,32 @@ |
|
|
|
|
<?php |
|
|
|
|
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* HTML class for a file upload field |
|
|
|
|
* |
|
|
|
|
* PHP versions 4 and 5 |
|
|
|
|
* |
|
|
|
|
* LICENSE: This source file is subject to version 3.01 of the PHP license |
|
|
|
|
* that is available through the world-wide-web at the following URI: |
|
|
|
|
* http://www.php.net/license/3_01.txt If you did not receive a copy of |
|
|
|
|
* the PHP License and are unable to obtain it through the web, please |
|
|
|
|
* send a note to license@php.net so we can mail you a copy immediately. |
|
|
|
|
* |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @copyright 2001-2009 The PHP Group |
|
|
|
|
* @license http://www.php.net/license/3_01.txt PHP License 3.01 |
|
|
|
|
* @version CVS: $Id: file.php,v 1.25 2009/04/04 21:34:02 avb Exp $ |
|
|
|
|
* @link http://pear.php.net/package/HTML_QuickForm |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Base class for <input /> form elements |
|
|
|
|
*/ |
|
|
|
|
require_once 'HTML/QuickForm/input.php'; |
|
|
|
|
'<?php |
|
|
|
|
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* HTML class for a file upload field |
|
|
|
|
* |
|
|
|
|
* PHP versions 4 and 5 |
|
|
|
|
* |
|
|
|
|
* LICENSE: This source file is subject to version 3.01 of the PHP license |
|
|
|
|
* that is available through the world-wide-web at the following URI: |
|
|
|
|
* http://www.php.net/license/3_01.txt If you did not receive a copy of |
|
|
|
|
* the PHP License and are unable to obtain it through the web, please |
|
|
|
|
* send a note to license@php.net so we can mail you a copy immediately. |
|
|
|
|
* |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @copyright 2001-2009 The PHP Group |
|
|
|
|
* @license http://www.php.net/license/3_01.txt PHP License 3.01 |
|
|
|
|
* @version CVS: $Id: file.php,v 1.25 2009/04/04 21:34:02 avb Exp $ |
|
|
|
|
* @link http://pear.php.net/package/HTML_QuickForm |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Base class for <input /> form elements |
|
|
|
|
*/ |
|
|
|
|
require_once 'HTML/QuickForm/input.php'; |
|
|
|
|
|
|
|
|
|
// register file-related rules |
|
|
|
|
if (class_exists('HTML_QuickForm')) { |
|
|
|
@ -37,15 +37,15 @@ if (class_exists('HTML_QuickForm')) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* HTML class for a file upload field |
|
|
|
|
* HTML class for a file upload field |
|
|
|
|
* |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @version Release: 3.2.11 |
|
|
|
|
* @since 1.0 |
|
|
|
|
* @category HTML |
|
|
|
|
* @package HTML_QuickForm |
|
|
|
|
* @author Adam Daniel <adaniel1@eesus.jnj.com> |
|
|
|
|
* @author Bertrand Mansion <bmansion@mamasam.com> |
|
|
|
|
* @author Alexey Borzov <avb@php.net> |
|
|
|
|
* @version Release: 3.2.11 |
|
|
|
|
* @since 1.0 |
|
|
|
|
*/ |
|
|
|
|
class HTML_QuickForm_file extends HTML_QuickForm_input |
|
|
|
|
{ |
|
|
|
@ -307,7 +307,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input |
|
|
|
|
if (!HTML_QuickForm_file::_ruleIsUploadedFile($elementValue)) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return (bool)preg_match($regex, $elementValue['name']); |
|
|
|
|
return (bool)preg_match($regex, $elementValue['name']); |
|
|
|
|
} // end func _ruleCheckFileName |
|
|
|
|
|
|
|
|
|
// }}} |
|
|
|
@ -322,7 +322,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input |
|
|
|
|
* @access private |
|
|
|
|
* @return mixed |
|
|
|
|
*/ |
|
|
|
|
function _findValue() |
|
|
|
|
function _findValue(&$values = null) |
|
|
|
|
{ |
|
|
|
|
if (empty($_FILES)) { |
|
|
|
|
return null; |
|
|
|
|