Skip to content
Snippets Groups Projects
Commit be7ceb69 authored by KHELIFA's avatar KHELIFA
Browse files

Merge branch '2024_rc' into '2024'

NEW Test la présence réelle des documents joints avant l'envoi (compatible avec...

See merge request !39
parents 3cfacf8a aa6f2660
No related branches found
Tags 14.0.9
1 merge request!39NEW Test la présence réelle des documents joints avant l'envoi (compatible avec...
Pipeline #4201 passed
......@@ -3,6 +3,9 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [Non Distribué]
## [14.0.9] - 18-10-2024
- Test la présence réelle des documents joints avant l'envoi (compatible avec dolibarr 18(git) et 20+)
## [14.0.8] - 29-08-2024
- Correction prise en compte de contact avec des parenthèses dans le nom, prenom, poste
......@@ -157,7 +160,8 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [4.0.0] - 08-09-2017
- Version initial.
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/compare/14.0.8...HEAD
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/compare/14.0.9...HEAD
[14.0.9]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.9
[14.0.8]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.8
[14.0.7]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.7
[14.0.6]: http://git.open-dsi.fr/dolibarr-extension/extendedemail/commits/14.0.6
......
# Module ExtendedEmail
## Hooks
### sendMail
- Check si tous les fichiers joints existes réellement avant l'envoi du mail
14.0.8
\ No newline at end of file
14.0.9
\ No newline at end of file
......@@ -84,7 +84,7 @@ class ActionsExtendedEmail
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
function doActions($parameters, &$object, &$action, $hookmanager)
public function doActions($parameters, &$object, &$action, $hookmanager)
{
global $conf;
$result = 0;
......@@ -106,6 +106,38 @@ class ActionsExtendedEmail
return $result;
}
/**
* Overloading the sendMail function : replacing the parent's function with the one below
*
* @param array $parameters Hook metadatas (context, etc...)
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
public function sendMail($parameters, &$object, &$action, $hookmanager)
{
// Check all files send exists
if (!empty($object->filename_list)) {
global $langs;
$not_found = false;
foreach ($object->filename_list as $filepath) {
if (!dol_is_file($filepath)) {
$langs->load("errors");
$object->errors[] = $langs->trans('ErrorFileNotFound', $filepath);
$not_found = true;
}
}
if ($not_found) {
return -1;
}
}
return 0;
}
/**
* Overloading the sendMailAfter function : replacing the parent's function with the one below
*
......@@ -115,7 +147,7 @@ class ActionsExtendedEmail
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
function sendMailAfter($parameters, &$object, &$action, $hookmanager)
public function sendMailAfter($parameters, &$object, &$action, $hookmanager)
{
if (!empty($conf->global->EXTENDEDEMAIL_DISABLE_EMAIL_SAVING))
return 0;
......@@ -139,7 +171,7 @@ class ActionsExtendedEmail
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
function getFormMail($parameters, &$object, &$action, $hookmanager)
public function getFormMail($parameters, &$object, &$action, $hookmanager)
{
global $conf, $langs, $form, $user;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment