Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2026-01-27 01:15:58 +01:00
commit 3ff33915c0
4 changed files with 124 additions and 4 deletions

View file

@ -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();
}

View file

@ -0,0 +1,119 @@
<?php
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@destailleur.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* 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 <https://www.gnu.org/licenses/>.
*/
/**
* \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 = '<a href="'.dolBuildUrl($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
}
$morehtmlcenter = '';
$registrationnumber = getHashUniqueIdOfRegistration();
$texttop = '<small class="opacitymedium">'.$langs->trans("RegistrationNumber").':</small> <small>'.dol_trunc($registrationnumber, 10).'</small>';
if (isRegistrationDataSaved()) {
$texttop = '';
}
print load_fiche_titre($title.'<br>'.$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 '<br><br>';
if (in_array($mysoc->country_code, array('FR'))) {
$htmltext = $langs->trans("UnalterableLogToolRegistrationFR").'<br>';
print info_admin($htmltext, 0, 0, 'warning');
}
print '<br>';
// 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 '<br><br>';
// End of page
llxFooter();
$db->close();

View file

@ -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 <b>%s</b>), 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

View file

@ -42,6 +42,6 @@ define('DOL_MAJOR_VERSION', '24');
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');