Merge pull request #19559 from fappels/debug_15_part2
Extrafield showOutputField parameter 4 'extrafieldsobjectkey' is now required
This commit is contained in:
commit
0fa82fbb4e
@ -144,6 +144,7 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Method getDictvalue has been renamed into getDictionaryValue to match camel case rule.
|
||||
* To execute shell or command line command, your code must never use method like exec, shell_exec, popen, .. but must use the built-in
|
||||
method executeCLI() available into core/class/utils.class.php
|
||||
* ExtraFields->showOutputField parameter 4 'extrafieldsobjectkey' is now required
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1488,7 +1488,7 @@ class ExtraFields
|
||||
* @param string $key Key of attribute
|
||||
* @param string $value Value to show
|
||||
* @param string $moreparam To add more parameters on html input tag (only checkbox use html input for output rendering)
|
||||
* @param string $extrafieldsobjectkey If defined (for example $object->table_element), function uses the new method to get extrafields data
|
||||
* @param string $extrafieldsobjectkey Required (for example $object->table_element).
|
||||
* @return string Formated value
|
||||
*/
|
||||
public function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '')
|
||||
@ -1510,11 +1510,9 @@ class ExtraFields
|
||||
$help = $this->attributes[$extrafieldsobjectkey]['help'][$key];
|
||||
$hidden = (empty($list) ? 1 : 0); // If $list empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
|
||||
} else {
|
||||
// Old usage
|
||||
$label = $this->attribute_label[$key];
|
||||
$type = $this->attribute_type[$key];
|
||||
$help = ''; // Not supported with old syntax
|
||||
$hidden = (empty($list) ? 1 : 0); // If $list empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller)
|
||||
// Old usage not allowed anymore
|
||||
dol_syslog(get_class($this).'::showOutputField extrafieldsobjectkey required', LOG_WARNING);
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($hidden) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user