From d114c5667267abd7a5350bf8864178bbd61d8ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 15 Nov 2020 23:49:16 +0100 Subject: [PATCH] add a tag which list all other tags in odt user --- .../core/modules/user/doc/doc_generic_user_odt.modules.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 771231e6041..a6aac58182a 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -364,6 +364,12 @@ class doc_generic_user_odt extends ModelePDFUser $tmparray = array_merge($array_user, $array_soc, $array_thirdparty, $array_other, $array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); + // to list all tags in odt template + $tags = ''; + foreach ($tmparray as $key => $value) { + $tags .= '{' . $key . '} => ' . $value ."\n"; + } + $tmparray = array_merge($tmparray, array('__ALL_TAGS__' => $tags)); $object->fetch_optionals(); // Call the ODTSubstitution hook $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);