parent
e3be718a57
commit
2002388098
@ -217,33 +217,10 @@ class FormMail
|
|||||||
function get_form($addfileaction='addfile',$removefileaction='removefile')
|
function get_form($addfileaction='addfile',$removefileaction='removefile')
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
global $hookmanager;
|
|
||||||
|
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
if (! is_object($hookmanager))
|
|
||||||
{
|
|
||||||
if (! class_exists('HookManager')) {
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
|
||||||
require DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
|
||||||
$hookmanager=new HookManager($this->db);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$hookmanager->initHooks(array('formmail'));
|
|
||||||
|
|
||||||
$parameters=array(
|
|
||||||
'addfileaction' => $addfileaction,
|
|
||||||
'removefileaction'=> $removefileaction
|
|
||||||
);
|
|
||||||
$reshook=$hookmanager->executeHooks('getFormMail', $parameters, $this);
|
|
||||||
|
|
||||||
if (!empty($reshook))
|
|
||||||
{
|
|
||||||
return $hookmanager->resPrint;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
// Define list of attached files
|
// Define list of attached files
|
||||||
@ -254,6 +231,7 @@ class FormMail
|
|||||||
if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
|
if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
|
||||||
if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
|
if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
|
||||||
|
|
||||||
|
|
||||||
$form=new Form($this->db);
|
$form=new Form($this->db);
|
||||||
|
|
||||||
$out.= "\n<!-- Debut form mail -->\n";
|
$out.= "\n<!-- Debut form mail -->\n";
|
||||||
@ -657,6 +635,5 @@ class FormMail
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user