Merge remote-tracking branch 'origin/master' into 2.2

This commit is contained in:
Jeremy Benoist
2016-11-03 16:41:29 +01:00
60 changed files with 2477 additions and 1936 deletions

View File

@ -4,7 +4,6 @@ namespace Wallabag\UserBundle\Mailer;
use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface;
use Craue\ConfigBundle\Util\Config;
/**
* Custom mailer for TwoFactorBundle email.
@ -61,16 +60,17 @@ class AuthCodeMailer implements AuthCodeMailerInterface
* @param \Twig_Environment $twig
* @param string $senderEmail
* @param string $senderName
* @param Config $craueConfig Craue\Config instance to get wallabag support url from database
* @param string $supportUrl wallabag support url
* @param string $wallabagUrl wallabag instance url
*/
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, Config $craueConfig)
public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl)
{
$this->mailer = $mailer;
$this->twig = $twig;
$this->senderEmail = $senderEmail;
$this->senderName = $senderName;
$this->supportUrl = $craueConfig->get('wallabag_support_url');
$this->wallabagUrl = $craueConfig->get('wallabag_url');
$this->supportUrl = $supportUrl;
$this->wallabagUrl = $wallabagUrl;
}
/**

View File

@ -6,7 +6,8 @@ services:
- "@twig"
- "%scheb_two_factor.email.sender_email%"
- "%scheb_two_factor.email.sender_name%"
- "@craue_config"
- '@=service(''craue_config'').get(''wallabag_support_url'')'
- '@=service(''craue_config'').get(''wallabag_url'')'
wallabag_user.password_resetting:
class: Wallabag\UserBundle\EventListener\PasswordResettingListener

View File

@ -1,11 +1,11 @@
# Two factor mail
auth_code:
on: 'sur'
on: "sur"
mailer:
subject: "Code d'authentification wallabag"
subject: "Code dauthentification wallabag"
body:
hello: "Bonjour %user%,"
first_para: "Comme vous avez activé la double authentification sur votre compte wallabag et que vous venez de vous connecter depuis un nouvel appareil (ordinateur, téléphone, etc.), nous vous envoyons un code pour valider votre connexion."
second_para: "Voici le code à renseigner :"
support: "Si vous avez un problème de connexion, n'hésitez pas à contacter le support :"
signature: "L'équipe wallabag"
support: "Si vous avez un problème de connexion, nhésitez pas à contacter le support :"
signature: "Léquipe wallabag"