init
This commit is contained in:
parent
66f21fc1d0
commit
eae3fe78f1
@ -8750,7 +8750,7 @@ function getLanguageCodeFromCountryCode($countrycode)
|
|||||||
*/
|
*/
|
||||||
function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode = 'add')
|
function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode = 'add')
|
||||||
{
|
{
|
||||||
global $hookmanager;
|
global $hookmanager, $db;
|
||||||
|
|
||||||
if (isset($conf->modules_parts['tabs'][$type]) && is_array($conf->modules_parts['tabs'][$type])) {
|
if (isset($conf->modules_parts['tabs'][$type]) && is_array($conf->modules_parts['tabs'][$type])) {
|
||||||
foreach ($conf->modules_parts['tabs'][$type] as $value) {
|
foreach ($conf->modules_parts['tabs'][$type] as $value) {
|
||||||
@ -8771,7 +8771,18 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type,
|
|||||||
complete_substitutions_array($substitutionarray, $langs, $object, array('needforkey'=>$values[2]));
|
complete_substitutions_array($substitutionarray, $langs, $object, array('needforkey'=>$values[2]));
|
||||||
$label = make_substitutions($reg[1], $substitutionarray);
|
$label = make_substitutions($reg[1], $substitutionarray);
|
||||||
} else {
|
} else {
|
||||||
$label = $langs->trans($values[2]);
|
$labeltemp = explode(',', $values[2]);
|
||||||
|
if (is_array($labeltemp)) {
|
||||||
|
$label = $langs->trans($labeltemp[0]);
|
||||||
|
if (!empty($labeltemp[1]) && is_object($object) && !empty($object->id)) {
|
||||||
|
dol_include_once($labeltemp[2]);
|
||||||
|
$obj = new $labeltemp[1]($db);
|
||||||
|
$function = $labeltemp[3];
|
||||||
|
$label .= $obj->$function($object->id, $obj);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$label = $langs->trans($values[2]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', ((is_object($object) && !empty($object->id)) ? $object->id : ''), $values[5]), 1);
|
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', ((is_object($object) && !empty($object->id)) ? $object->id : ''), $values[5]), 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user