[-] BO & FO & MO : #PSCFI-4237 : adding id_lang in method l() of class Mail()

This commit is contained in:
lLefevre
2011-12-05 17:22:47 +00:00
parent 8167ef6f50
commit 1c32791fa0
16 changed files with 32 additions and 32 deletions
@@ -295,7 +295,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
if (Mail::Send(
$this->context->language->id,
'forward_msg',
Mail::l('Fwd: Customer message'),
Mail::l('Fwd: Customer message', $this->context->language->id),
$params,
$employee->email,
$employee->firstname.' '.$employee->lastname,
@@ -317,7 +317,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
if (Mail::Send(
(int)$cookie->id_lang,
'forward_msg',
Mail::l('Fwd: Customer message'),
Mail::l('Fwd: Customer message', (int)$cookie->id_lang),
$params, $email, null,
$current_employee->email, $current_employee->firstname.' '.$current_employee->lastname,
null, null, _PS_MAIL_DIR_, true))
@@ -359,7 +359,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
if (Mail::Send(
$ct->id_lang,
'reply_msg',
Mail::l('An answer to your message is available').' #ct'.$ct->id.'#tc'.$ct->token,
Mail::l('An answer to your message is available', $ct->id_lang).' #ct'.$ct->id.'#tc'.$ct->token,
$params, Tools::getValue('msg_email'), null, null, null, $file_attachment, null,
_PS_MAIL_DIR_, true))
{
+1 -1
View File
@@ -194,7 +194,7 @@ class AdminLoginControllerCore extends AdminController
'{passwd}' => $pwd
);
if (Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'password', Mail::l('Your new admin password'), $params, $employee->email, $employee->firstname.' '.$employee->lastname))
if (Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'password', Mail::l('Your new admin password', (int)Configuration::get('PS_LANG_DEFAULT')), $params, $employee->email, $employee->firstname.' '.$employee->lastname))
die(Tools::jsonEncode(array('hasErrors' => false, 'confirm' => $this->l('Your password has been e-mailed to you'))));
else
die(Tools::jsonEncode(array('hasErrors' => true, 'errors' => array(Tools::displayError('An error occurred during your password change.')))));
+5 -5
View File
@@ -195,7 +195,7 @@ class AdminOrdersControllerCore extends AdminController
'{lastname}' => $customer->lastname,
'{id_order}' => (int)$order->id
);
@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit'), $templateVars,
@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars,
$customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL,
_PS_MAIL_DIR_, true);
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$order->id.'&vieworder&conf=4&token='.$this->token);
@@ -317,8 +317,8 @@ class AdminOrdersControllerCore extends AdminController
'{id_order}' => $order->id,
'{message}' => (Configuration::get('PS_MAIL_TYPE') == 2 ? $cm->message : Tools::nl2br($cm->message))
);
if (@Mail::Send((int)($order->id_lang), 'order_merchant_comment',
Mail::l('New message regarding your order'), $varsTpl, $customer->email,
if (@Mail::Send((int)$order->id_lang, 'order_merchant_comment',
Mail::l('New message regarding your order', (int)$order->id_lang), $varsTpl, $customer->email,
$customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL, _PS_MAIL_DIR_, true))
Tools::redirectAdmin(self::$currentIndex.'&id_order='.$id_order.'&vieworder&conf=11'.'&token='.$this->token);
}
@@ -501,7 +501,7 @@ class AdminOrdersControllerCore extends AdminController
$currency = $this->context->currency;
$params['{voucher_amount}'] = Tools::displayPrice($voucher->value, $currency, false);
$params['{voucher_num}'] = $voucher->name;
@Mail::Send((int)($order->id_lang), 'voucher', Mail::l('New voucher regarding your order'),
@Mail::Send((int)$order->id_lang, 'voucher', Mail::l('New voucher regarding your order', (int)$order->id_lang),
$params, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL,
NULL, _PS_MAIL_DIR_, true);
}
@@ -854,7 +854,7 @@ class AdminOrdersControllerCore extends AdminController
$mailVars = array('{order_link}' => Context::getContext()->link->getPageLink('order', false, (int)$cart->id_lang, 'step=3&recover_cart='.(int)$cart->id.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.(int)$cart->id)),
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,);
if (Mail::Send((int)$cart->id_lang, 'backoffice_order', Mail::l('Process the payment of your order'), $mailVars, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL,_PS_MAIL_DIR_, true))
if (Mail::Send((int)$cart->id_lang, 'backoffice_order', Mail::l('Process the payment of your order', (int)$cart->id_lang), $mailVars, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, NULL, NULL,_PS_MAIL_DIR_, true))
die(Tools::jsonEncode(array('errors' => false, 'result' => $this->l('The mail was sent to your customer.'))));
}
}