Revert "New: add hook getFormMail"

This reverts commit c732532483.
This commit is contained in:
Laurent Destailleur 2013-01-26 13:40:31 +01:00
parent e3be718a57
commit 2002388098

View File

@ -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;
} }
} }
}
?> ?>