diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 18d98ffd8a0..e6a854405fd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6660,6 +6660,14 @@ function complete_substitutions_array(&$substitutionarray, $outputlangs, $object } } } + if (!empty($conf->global->ODT_ENABLE_ALL_TAGS_IN_SUBSTITUTIONS) { + // to list all tags in odt template + $tags = ''; + foreach ($substitutionarray as $key => $value) { + $tags .= '{' . $key . '} => ' . $value ."\n"; + } + $substitutionarray = array_merge($substitutionarray, array('__ALL_TAGS__' => $tags)); + } } /**