diff --git a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php index 501bfc153b0..68cf3de470c 100644 --- a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php @@ -529,7 +529,6 @@ class doc_generic_project_odt extends ModelePDFProjects else // Text { $odfHandler->setVars($key, $value, true, 'UTF-8'); - $odfHandler->setVarsHeadFooter($key, $value, true, 'UTF-8'); } } catch(OdfException $e) @@ -1037,4 +1036,4 @@ class doc_generic_project_odt extends ModelePDFProjects } } -?> \ No newline at end of file +?> diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 94c69705442..d2cb8e0b6e1 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -128,33 +128,6 @@ class Odf return $this; } - /** - * Assing a template variable - * - * @param string $key name of the variable within the template - * @param string $value replacement value - * @param bool $encode if true, special XML characters are encoded - * @throws OdfException - * @return odf - */ - public function setVarsHeadFooter($key, $value, $encode = true, $charset = 'ISO-8859') - { - $tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']; - // TODO Warning string may be: - // {aaa} - // instead of {aaa} so we should enhance this function. - //print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'
'; - if (strpos($this->stylesXml, $tag) === false && strpos($this->stylesXml , $tag) === false) { - //if (strpos($this->contentXml, '">'. $key . '') === false) { - throw new OdfException("var $key not found in the document"); - //} - } - $value = $encode ? htmlspecialchars($value) : $value; - $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; - $this->vars[$tag] = str_replace("\n", "", $value); - return $this; - } - /** * Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code * diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 2933bac2dbc..9193b8e103e 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -698,7 +698,7 @@ else $tmpcode=''; if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$type); - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; if ($_error) { print $langs->trans("RefAlreadyExists"); @@ -881,7 +881,7 @@ else print ''; // Ref - print ''; + print ''; // Label print '';
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("Label").'