dolibarr/htdocs/datapolicy/lib/datapolicy.lib.php

55 lines
1.5 KiB
PHP
Raw Normal View History

<?php
2018-10-09 14:40:15 +02:00
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
*
* 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
*/
/**
* Prepare admin pages header
*
* @return array
*/
2018-10-15 14:04:42 +02:00
function datapolicyAdminPrepareHead()
{
global $langs, $conf;
2018-10-15 14:04:42 +02:00
$langs->load("datapolicy@datapolicy");
$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");
$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-15 14:04:42 +02:00
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicy');
return $head;
}