From 70089d2e4dbb65c4c821310f286e3bd4f4717513 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Jan 2026 22:38:38 +0100 Subject: [PATCH 1/2] Prepare v23 --- htdocs/version.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/version.inc.php b/htdocs/version.inc.php index 4ceafaf9e80..78284cce9ab 100644 --- a/htdocs/version.inc.php +++ b/htdocs/version.inc.php @@ -42,6 +42,6 @@ define('DOL_MAJOR_VERSION', '23'); define('DOL_VERSION', constant('DOL_MAJOR_VERSION').'.'.constant('DOL_MINOR_VERSION')); // DOL_VERSION is now a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c -// Set to 1 if the beta version is a just a candidate for certification (not yet certified) or if the stable version has been certified. -// Use 2 to force LNE featuresfro debug purposes -define('CERTIF_LNE', '1'); +// Set to 1 if the beta version is a just a candidate for certification or if the stable version has been certified. +// Use 2 to force LNE features for debug purposes +define('CERTIF_LNE', '0'); From 97b7e52a97fe45e004e44ce4717d7cd84f5f1b58 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Jan 2026 01:13:22 +0100 Subject: [PATCH 2/2] Add the registration page --- htdocs/blockedlog/admin/blockedlog.php | 2 +- htdocs/blockedlog/admin/registration.php | 119 +++++++++++++++++++++++ htdocs/langs/en_US/blockedlog.lang | 1 + 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 htdocs/blockedlog/admin/registration.php diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index 1d5aac9cccc..4f58f74bcc2 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -42,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; $langs->loadLangs(array('admin', 'blockedlog', 'other')); // Access Control -if (!$user->admin || empty($conf->blockedlog->enabled)) { +if (!$user->admin || !isModEnabled('blockedlog')) { accessforbidden(); } diff --git a/htdocs/blockedlog/admin/registration.php b/htdocs/blockedlog/admin/registration.php new file mode 100644 index 00000000000..2200b49fa62 --- /dev/null +++ b/htdocs/blockedlog/admin/registration.php @@ -0,0 +1,119 @@ + + * Copyright (C) 2017-2018 Laurent Destailleur + * Copyright (C) 2024 Frédéric France + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/blockedlog/admin/registration.php + * \ingroup blockedlog + * \brief Page setup for blockedlog module (user registration) + */ + + +// Load Dolibarr environment +require '../../main.inc.php'; +/** + * @var Conf $conf + * @var DoliDB $db + * @var HookManager $hookmanager + * @var Societe $mysoc + * @var Translate $langs + * @var User $user + */ +require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'blockedlog', 'other')); + +// Get Parameters +$action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); +$withtab = GETPOSTINT('withtab'); + +// Access Control +if (!$user->admin) { + accessforbidden(); +} + + + +/* + * Actions + */ + +// TODO + + +/* + * View + */ + +$form = new Form($db); +$block_static = new BlockedLog($db); +$block_static->loadTrackedEvents(); + +$title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog'); +$help_url="EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable"; + +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-blockedlog page-admin_blockedlog'); + +$linkback = ''; +if ($withtab) { + $linkback = ''.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').''.$langs->trans("BackToModuleList").''; +} + +$morehtmlcenter = ''; + +$registrationnumber = getHashUniqueIdOfRegistration(); +$texttop = ''.$langs->trans("RegistrationNumber").': '.dol_trunc($registrationnumber, 10).''; +if (isRegistrationDataSaved()) { + $texttop = ''; +} + +print load_fiche_titre($title.'
'.$texttop, $linkback, 'blockedlog', 0, '', '', $morehtmlcenter); + +if ($withtab) { + $head = blockedlogadmin_prepare_head(GETPOST('withtab', 'alpha')); + print dol_get_fiche_head($head, 'blockedlog', '', -1); +} + +//print $texttop; +//print '

'; + +if (in_array($mysoc->country_code, array('FR'))) { + $htmltext = $langs->trans("UnalterableLogToolRegistrationFR").'
'; + print info_admin($htmltext, 0, 0, 'warning'); +} + +print '
'; + + +// TODO Form to edit registration fields +// + code to (re)send data when modified and to init module of not initialized yet + + +if ($withtab) { + print dol_get_fiche_end(); +} + +print '

'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index 722007755f8..954b9710ba5 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/blockedlog.lang @@ -7,6 +7,7 @@ UnalterableLogTool1=The law of some countries (like in France when doing B2C), a UnalterableLogTool1FR=In France, you MUST generate archives of the unalterable logs, at least, once every year. We recommand to do it once per month. Also, you MUST keep these archives for at least 7 years. According to the law, It is the user's responsibility to store their archives on media that guarantee their preservation, including in the event of hardware failure, so we recommand to store them on at least 2 different physical supports. UnalterableLogTool2=This unalterable Logs contains the history of unalterable data. It is the responsibility of the user of the application to ensure system backups in order to comply with legal obligations. If you decide to secure your unalterable logs by just exporting and storing archives files (instead of a full complete backup avaiable on tab %s), it is recommended to store the exported archive files in at least 2 different places (Secured cloud, External USB drive, ...). UnalterableLogTool3=Note that, there is no feature to purge this log and every change tried to be done directly into this log (by a hacker for example) will be reported with a non-valid fingerprint. +UnalterableLogToolRegistrationFR=In France, before using a software certified for the Loi Finance, you must register your contact information to the entity that had requested the certification, in order to be informed of any issue or upgrade required of your installation. This is a legal requirement to be allowed to use the certified version of Dolibarr. FingerprintsDesc2=If you really need to purge this table because you used your application for a demo/test purpose and want to clean your data to start your production, you can ask your reseller or integrator to reset your database (all your data will be removed). CompanyInitialKey=Company initial key (hash of genesis block) BrowseBlockedLog=Unalterable logs