From 899ae0f52de9ce36ed6d299934099602b2875bf0 Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Mon, 24 Feb 2020 15:07:13 +0100 Subject: [PATCH] Add position to modulebuilder template --- .../mymodule/doc/doc_generic_myobject_odt.modules.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index df2c61ab7f5..940be47a780 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -422,9 +422,11 @@ class doc_generic_myobject_odt extends ModelePDFMyObject } if ($foundtagforlines) { - foreach ($object->lines as $line) + $linenumber = 0; + foreach ($object->lines as $line) { - $tmparray = $this->get_substitutionarray_lines($line, $outputlangs); + $linenumber++; + $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);