Преглед на файлове

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