1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 04:12:00 +02:00

Fixes #974 - user extended fields were not using correct form element in admin area.

This commit is contained in:
Cameron
2015-04-24 00:13:09 -07:00
parent 1b16cadb47
commit 821922c31a
2 changed files with 81 additions and 23 deletions

View File

@@ -3493,10 +3493,12 @@ class e_form
$value = e107::unserialize($value); // (saved as array, return it as an array)
}
$meth = (!empty($attributes['method'])) ? $attributes['method'] : $method;
if(method_exists($this,$method))
if(method_exists($this,$meth))
{
$value = call_user_func_array(array($this, $method), array($value, 'read', $parms));
$parms['field'] = $field;
$value = call_user_func_array(array($this, $meth), array($value, 'read', $parms));
}
else
{
@@ -3634,6 +3636,7 @@ class e_form
{
// return print_a($value,true);
$parms = vartrue($attributes['writeParms'], array());
$tp = e107::getParser();
if(is_string($parms)) parse_str($parms, $parms);
@@ -3749,6 +3752,7 @@ class e_form
break;
case 'tags':
$maxlength = vartrue($parms['maxlength'], 255);
$ret = vartrue($parms['pre']).$this->tags($key, $value, $maxlength, $parms).vartrue($parms['post']); // vartrue($parms['__options']) is limited. See 'required'=>true
break;
@@ -4011,7 +4015,10 @@ class e_form
break;
case 'method': // Custom Function
$ret = call_user_func_array(array($this, $key), array($value, 'write', $parms));
$meth = (!empty($attributes['method'])) ? $attributes['method'] : $key;
$parms['field'] = $key;
$ret = call_user_func_array(array($this, $meth), array($value, 'write', $parms));
break;
case 'upload': //TODO - from method