aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_mail.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_mail.inc.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index 07764f006..92d5ead6a 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -327,7 +327,8 @@ order by
* - group_id: mail are sent to group with this Id
* - email_format: mail format
* - keyargs_subject: mail subject on l10n_args format
- * - tpl_shortname: short template name without extension
+ * - dirname: short name of directory including template
+ * - tpl_shortname: short template name without extension
* - assign_vars: array used to assign_vars to mail template
* - language_selected: send mail only to user with this selected language
*
@@ -335,7 +336,8 @@ order by
*/
function pwg_mail_group(
$group_id, $email_format, $keyargs_subject,
- $tpl_shortname, $assign_vars = array(), $language_selected = '')
+ $dirname, $tpl_shortname,
+ $assign_vars = array(), $language_selected = '')
{
global $conf;
$return = true;
@@ -407,7 +409,7 @@ WHERE
$mail_template = get_mail_template($email_format, $elem);
$mail_template->set_filename($tpl_shortname,
- (IN_ADMIN ? 'admin/' : '').$tpl_shortname.'.tpl');
+ (empty($dirname) ? '' : $dirname.'/').$tpl_shortname.'.tpl');
$mail_template->assign_vars($assign_vars);
$return = pwg_mail