Explorar o código

made logoutPath localizable as well

Ned Schwartz %!s(int64=14) %!d(string=hai) anos
pai
achega
47df88bfc9

+ 3 - 1
src/Symfony/Component/Security/Http/Firewall/LogoutListener.php

@@ -69,9 +69,10 @@ class LogoutListener implements ListenerInterface
     {
         $request = $event->getRequest();
 
+        $logoutPath = str_replace('{_locale}', $request->getSession()->getLocale(), $this->logoutPath);
         $targetUrl = str_replace('{_locale}', $request->getSession()->getLocale(), $this->targetUrl);
         
-        if ($this->logoutPath !== $request->getPathInfo()) {
+        if ($logoutPath !== $request->getPathInfo()) {
             return;
         }
 
@@ -96,3 +97,4 @@ class LogoutListener implements ListenerInterface
 
         $event->setResponse($response);
     }
+}