Permalink
Browse files

Fixes a bug on localised file input writing in HTMLForm library.

  • Loading branch information...
JB Lebrun
JB Lebrun committed Nov 12, 2018
1 parent 9325d36 commit 807a241b5633adc5dc67dd22584f10ba33415e8f
Showing with 6 additions and 7 deletions.
  1. +6 −7 engine/lib/object/HTMLForm.php.inc
@@ -4,9 +4,9 @@
* @details Engine / Object Library
* @file engine/lib/object/HTMLForm.php.inc
* @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.1.2
* @version 1.1.3
* @date Creation: Jun 2005
* @date Modification: Oct 2018
* @date Modification: Nov 2018
* @copyright 2005 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -139,6 +139,7 @@ class HTMLForm {
'readonly' => '',
'list' => '',
'autocomplete' => '',
'allowMultiple' => false,
'size' => 0,
);
@@ -582,7 +583,7 @@ class HTMLForm {
global $camyks;
/* build param list */
$params = array('class'=>'', 'buttons'=>null, 'accept'=>'', 'allowMultiple'=>false);
$params = array('class'=>'', 'buttons'=>null, 'accept'=>'');
/* check limit */
$this->check_inputsLimit(2);
@@ -601,10 +602,6 @@ class HTMLForm {
/* check object params */
$n = $params['name'].($params['language']?'_'.$params['language']:'');
$params['name'] = $n;
if ($params['allowMultiple'] == true)
$params['name'] .= '[]';
if ($params['default'] === '' and isset($this->object)) {
$params['default'] = isset($this->object->vars[$n])?$this->object->vars[$n]:'';
}
@@ -1494,6 +1491,8 @@ class HTMLForm {
else
$html .= ' name="'.$params['name'].'_'.$params['language'].'"';
}
if ($params['allowMultiple'] == true)
$params['name'] .= '[]';
if ($params['id'] != '')
$html .= ' id="'.$params['id'].'"';
if ($params['maxlength'] > -1)

0 comments on commit 807a241

Please sign in to comment.