2018-10-06 00:51:47 +00:00
|
|
|
<?php
|
2024-11-04 22:53:20 +00:00
|
|
|
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
|
|
|
|
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
2024-11-04 11:32:13 +00:00
|
|
|
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
2018-10-06 00:51:47 +00:00
|
|
|
*
|
|
|
|
|
* 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
|
2019-09-23 19:55:30 +00:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2018-10-06 00:51:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
2019-02-24 13:30:02 +00:00
|
|
|
* \file htdocs/datapolicy/lib/datapolicy.lib.php
|
2018-10-15 12:04:42 +00:00
|
|
|
* \ingroup datapolicy
|
|
|
|
|
* \brief Library files with common functions for datapolicy
|
2018-10-06 00:51:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Prepare admin pages header
|
|
|
|
|
*
|
2024-11-04 11:32:13 +00:00
|
|
|
* @return array<array{0:string,1:string,2:string}>
|
2018-10-06 00:51:47 +00:00
|
|
|
*/
|
2018-10-15 12:04:42 +00:00
|
|
|
function datapolicyAdminPrepareHead()
|
2018-10-06 00:51:47 +00:00
|
|
|
{
|
2020-10-31 13:32:18 +00:00
|
|
|
global $langs, $conf;
|
2018-10-06 00:51:47 +00:00
|
|
|
|
2022-09-08 14:19:11 +00:00
|
|
|
$langs->load("datapolicy");
|
2018-10-06 00:51:47 +00:00
|
|
|
|
2020-10-31 13:32:18 +00:00
|
|
|
$h = 0;
|
|
|
|
|
$head = array();
|
2018-10-06 00:51:47 +00:00
|
|
|
|
2020-10-31 13:32:18 +00:00
|
|
|
$head[$h][0] = DOL_URL_ROOT."/datapolicy/admin/setup.php";
|
2025-07-24 10:21:39 +00:00
|
|
|
|
|
|
|
|
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
|
|
|
|
$head[$h][1] = $langs->trans("DataAnonymizationOrDeletion");
|
|
|
|
|
} else {
|
|
|
|
|
$head[$h][1] = $langs->trans("DataAnonymization");
|
|
|
|
|
}
|
2020-10-31 13:32:18 +00:00
|
|
|
$head[$h][2] = 'settings';
|
|
|
|
|
$h++;
|
2018-10-06 00:51:47 +00:00
|
|
|
|
2020-10-31 13:32:18 +00:00
|
|
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'datapolicy');
|
2019-09-05 12:24:13 +00:00
|
|
|
|
2020-10-31 13:32:18 +00:00
|
|
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'datapolicy', 'remove');
|
2018-10-06 00:51:47 +00:00
|
|
|
|
2020-10-31 13:32:18 +00:00
|
|
|
return $head;
|
2018-10-06 00:51:47 +00:00
|
|
|
}
|