瀏覽代碼

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