Skip to content

Commit

Permalink
FIX: langs in common docgenerator (#29774)
Browse files Browse the repository at this point in the history
  • Loading branch information
altairis-melina authored May 28, 2024
1 parent 683c11e commit 49ef7cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion htdocs/core/class/commondocgenerator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016-2023 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2016-2023 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2024 Mélina Joum <melina.joum@altairis.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1464,6 +1465,11 @@ public function getExtrafieldsInHtml($object, $outputlangs, $params = array())
continue;
}

// Load language if required
if (!empty($extrafields->attributes[$object->table_element]['langfile'][$key])) {
$outputlangs->load($extrafields->attributes[$object->table_element]['langfile'][$key]);
}

$field = new stdClass();
$field->rank = intval($extrafields->attributes[$object->table_element]['pos'][$key]);
$field->content = $this->getExtrafieldContent($object, $key, $outputlangs);
Expand Down

0 comments on commit 49ef7cd

Please sign in to comment.