X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FUserBundle%2FMailer%2FAuthCodeMailer.php;h=961208f27d2ff1340c93806d77a8a83a149c62af;hb=e52ee565f7df9566d53577cd127088141641619c;hp=d8403491f6d1b0a81d5d1a623b4208a080b794ed;hpb=27c837dcd1640a7f5f0ed197e882eefd53ba8273;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php index d8403491..961208f2 100644 --- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php +++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php @@ -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; } /** @@ -82,7 +82,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface { $template = $this->twig->loadTemplate('WallabagUserBundle:TwoFactor:email_auth_code.html.twig'); - $subject = $template->renderBlock('subject', array()); + $subject = $template->renderBlock('subject', []); $bodyHtml = $template->renderBlock('body_html', [ 'user' => $user->getName(), 'code' => $user->getEmailAuthCode(),