소스 검색

made logoutPath localizable as well

Ned Schwartz 14 년 전
부모
커밋
47df88bfc9
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/Symfony/Component/Security/Http/Firewall/LogoutListener.php

+ 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);
     }
+}