Ignore:
Timestamp:
Nov 6, 2013, 6:57:53 PM (10 years ago)
Author:
mistic100
Message:

feature 2995: New email template
restore get_l10n_args removed at r25357
apply changes to NBM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_notification_by_mail.inc.php

    r25018 r25360  
    257257  if ($is_action_send)
    258258  {
    259     $nbm_user['theme'] = $user['theme'];
    260     $env_nbm['mail_template'] = get_mail_template($env_nbm['email_format'], $nbm_user['theme']);
     259    $env_nbm['mail_template'] = get_mail_template($env_nbm['email_format']);
    261260    $env_nbm['mail_template']->set_filename('notification_by_mail', 'notification_by_mail.tpl');
    262261  }
     
    424423        set_user_on_env_nbm($nbm_user, true);
    425424
    426         $subject = '['.$conf['gallery_title'].']: '.($is_subscribe ? l10n('Subscribe to notification by mail'): l10n('Unsubscribe from notification by mail'));
     425        $subject = '['.$conf['gallery_title'].'] '.($is_subscribe ? l10n('Subscribe to notification by mail'): l10n('Unsubscribe from notification by mail'));
    427426
    428427        // Assign current var for nbm mail
     
    440439          )
    441440        );
    442 
    443         if (pwg_mail
    444             (
    445               format_email(stripslashes($nbm_user['username']), $nbm_user['mail_address']),
    446               array
    447               (
    448                 'from' => $env_nbm['send_as_mail_formated'],
    449                 'subject' => $subject,
    450                 'email_format' => $env_nbm['email_format'],
    451                 'content' => $env_nbm['mail_template']->parse('notification_by_mail', true),
    452                 'content_format' => $env_nbm['email_format'],
    453                 'theme' => $nbm_user['theme']
    454               )
    455             ))
     441       
     442        $ret = pwg_mail(
     443          array(
     444            'name' => stripslashes($nbm_user['username']),
     445            'email' => $nbm_user['mail_address'],
     446            ),
     447          array(
     448            'from' => $env_nbm['send_as_mail_formated'],
     449            'subject' => $subject,
     450            'email_format' => $env_nbm['email_format'],
     451            'content' => $env_nbm['mail_template']->parse('notification_by_mail', true),
     452            'content_format' => $env_nbm['email_format'],
     453            )
     454          );
     455
     456        if ($ret)
    456457        {
    457458          inc_mail_sent_success($nbm_user);
Note: See TracChangeset for help on using the changeset viewer.