diff --git a/htdocs/datapolicies/class/datapolicies.class.php b/htdocs/datapolicies/class/datapolicies.class.php index 4b21dba1d9a..df818db6f5e 100644 --- a/htdocs/datapolicies/class/datapolicies.class.php +++ b/htdocs/datapolicies/class/datapolicies.class.php @@ -16,11 +16,9 @@ */ /** - * \file datapolicies/class/actions_datapolicies.class.php + * \file datapolicies/class/datapolicies.class.php * \ingroup datapolicies - * \brief Example hook overload. - * - * Put detailed description here. + * \brief Class to manage feature of Data Policies module. */ include_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; @@ -147,6 +145,9 @@ Class DataPolicies extends Contact function sendMailDataPoliciesContact($contact) { global $langs, $conf, $db, $user; + + $error = 0; + $from = $user->getFullName($langs) . ' <' . $user->email . '>'; $replyto = $from; $sendto = $contact->email; @@ -165,6 +166,9 @@ Class DataPolicies extends Contact $message = $conf->global->$ma; $linka = $conf->global->$la; $linkr = $conf->global->$lr; + $sendtocc = $sendtobcc = ''; + $filepath = $mimetype = $filename = array(); + $deliveryreceipt = 0; $substitutionarray = array( '__LINKACCEPT__' => ''.$linka.'', @@ -217,6 +221,9 @@ Class DataPolicies extends Contact function sendMailDataPoliciesCompany($societe) { global $langs, $conf, $db, $user; + + $error = 0; + $from = $user->getFullName($langs) . ' <' . $user->email . '>'; $replyto = $from; $sendto = $societe->email; @@ -236,7 +243,9 @@ Class DataPolicies extends Contact $message = $conf->global->$ma; $linka = $conf->global->$la; $linkr = $conf->global->$lr; - + $sendtocc = $sendtobcc = ''; + $filepath = $mimetype = $filename = array(); + $deliveryreceipt = 0; $substitutionarray = array( '__LINKACCEPT__' => ''.$linka.'', @@ -284,6 +293,9 @@ Class DataPolicies extends Contact function sendMailDataPoliciesAdherent($adherent) { global $langs, $conf, $db, $user; + + $error = 0; + $from = $user->getFullName($langs) . ' <' . $user->email . '>'; $replyto = $from; $sendto = $adherent->email; @@ -301,7 +313,9 @@ Class DataPolicies extends Contact $message = $conf->global->$ma; $linka = $conf->global->$la; $linkr = $conf->global->$lr; - + $sendtocc = $sendtobcc = ''; + $filepath = $mimetype = $filename = array(); + $deliveryreceipt = 0; $substitutionarray = array( '__LINKACCEPT__' => ''.$linka.'', diff --git a/htdocs/datapolicies/public/index.php b/htdocs/datapolicies/public/index.php index 4dd07f2ea2d..7ecceeb9940 100644 --- a/htdocs/datapolicies/public/index.php +++ b/htdocs/datapolicies/public/index.php @@ -21,6 +21,7 @@ * \ingroup datapolicies * \brief datapolicies setup page. */ + if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged. if (!defined('NOCSRFCHECK')) @@ -35,12 +36,13 @@ dol_include_once('/adherents/class/adherent.class.php'); dol_include_once('/user/class/user.class.php'); dol_include_once('/datapolicies/class/datapolicies.class.php'); -$idc = GETPOST('c'); -$ids = GETPOST('s'); -$ida = GETPOST('a'); -$action = GETPOST('action'); -$lang = GETPOST('l'); -$code = GETPOST('key'); +$idc = GETPOST('c', 'int'); +$ids = GETPOST('s', 'int'); +$ida = GETPOST('a', 'int'); +$action = GETPOST('action', 'alpha'); +$lang = GETPOST('l', 'alpha'); +$code = GETPOST('key', 'alpha'); + $acc = "DATAPOLICIESACCEPT_" . $lang; $ref = "DATAPOLICIESREFUSE_" . $lang; $langs->load('datapolicies@datapolicies',0,0,$lang);