2018-10-06 02:51:47 +02:00
|
|
|
<?php
|
2018-10-09 14:40:15 +02:00
|
|
|
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
2018-10-06 02:51:47 +02: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
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
2018-10-15 14:04:42 +02:00
|
|
|
* \file datapolicy/lib/datapolicy.lib.php
|
|
|
|
|
* \ingroup datapolicy
|
|
|
|
|
* \brief Library files with common functions for datapolicy
|
2018-10-06 02:51:47 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Prepare admin pages header
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2018-10-15 14:04:42 +02:00
|
|
|
function datapolicyAdminPrepareHead()
|
2018-10-06 02:51:47 +02:00
|
|
|
{
|
|
|
|
|
global $langs, $conf;
|
|
|
|
|
|
2018-10-15 14:04:42 +02:00
|
|
|
$langs->load("datapolicy@datapolicy");
|
2018-10-06 02:51:47 +02:00
|
|
|
|
|
|
|
|
$h = 0;
|
|
|
|
|
$head = array();
|
|
|
|
|
|
2018-10-15 14:04:42 +02:00
|
|
|
$head[$h][0] = dol_buildpath("/datapolicy/admin/setup.php", 1);
|
|
|
|
|
$head[$h][1] = $langs->trans("Deletion");
|
2018-10-06 02:51:47 +02:00
|
|
|
$head[$h][2] = 'settings';
|
|
|
|
|
$h++;
|
|
|
|
|
|
2018-10-12 20:37:59 +02:00
|
|
|
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS))
|
|
|
|
|
{
|
2018-10-15 14:04:42 +02:00
|
|
|
$head[$h][0] = dol_buildpath("/datapolicy/admin/setupmail.php", 1);
|
2018-10-12 20:37:59 +02:00
|
|
|
$head[$h][1] = $langs->trans("DATAPOLICIESMail");
|
|
|
|
|
$head[$h][2] = 'settings';
|
|
|
|
|
$h++;
|
|
|
|
|
}
|
2018-10-06 02:51:47 +02:00
|
|
|
|
2018-10-15 14:04:42 +02:00
|
|
|
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicy');
|
2018-10-06 02:51:47 +02:00
|
|
|
|
|
|
|
|
return $head;
|
|
|
|
|
}
|