From fcbae93328e4e95ea65a6e29f00cad48e9661339 Mon Sep 17 00:00:00 2001 From: Lamrani Abdel Date: Tue, 21 Mar 2023 16:00:50 +0100 Subject: [PATCH] add function writePropsInAsciiDoc when Init object if doc was generated --- htdocs/modulebuilder/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 82542691f2c..5fdcb307100 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -1586,6 +1586,13 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { setEventMessages($langs->trans('ErrorFailToCreateFile', $pathoffiletoeditsrc), null, 'errors'); $error++; } + // check if documentation was generate and add table of properties object + $file = $destdir.'/class/'.strtolower($objectname).'.class.php'; + $destfile = $destdir.'/doc/Documentation.asciidoc'; + + if (file_exists($destfile)) { + writePropsInAsciiDoc($file, $objectname, $destfile); + } } if (!$error) { // Edit sql with new properties