"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-bundle/src/EventListener/PreviewAuthenticationListener.php" between
contao-4.9.11.tar.gz and contao-4.9.12.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Long-term support (LTS).

PreviewAuthenticationListener.php  (contao-4.9.11):PreviewAuthenticationListener.php  (contao-4.9.12)
skipping to change at line 47 skipping to change at line 47
/** /**
* @var UrlGeneratorInterface * @var UrlGeneratorInterface
*/ */
private $router; private $router;
/** /**
* @var UriSigner * @var UriSigner
*/ */
private $uriSigner; private $uriSigner;
/** public function __construct(ScopeMatcher $scopeMatcher, TokenChecker $tokenC
* @var string hecker, UrlGeneratorInterface $router, UriSigner $uriSigner)
*/
private $previewScript;
public function __construct(ScopeMatcher $scopeMatcher, TokenChecker $tokenC
hecker, UrlGeneratorInterface $router, UriSigner $uriSigner, string $previewScri
pt)
{ {
$this->scopeMatcher = $scopeMatcher; $this->scopeMatcher = $scopeMatcher;
$this->tokenChecker = $tokenChecker; $this->tokenChecker = $tokenChecker;
$this->router = $router; $this->router = $router;
$this->uriSigner = $uriSigner; $this->uriSigner = $uriSigner;
$this->previewScript = $previewScript;
} }
public function __invoke(RequestEvent $event): void public function __invoke(RequestEvent $event): void
{ {
$request = $event->getRequest(); $request = $event->getRequest();
if ( if (
'' === $this->previewScript !$request->attributes->get('_preview', false)
|| $request->getScriptName() !== $this->previewScript || $this->scopeMatcher->isBackendRequest($request)
|| !$this->scopeMatcher->isFrontendRequest($request)
|| $this->tokenChecker->hasBackendUser() || $this->tokenChecker->hasBackendUser()
) { ) {
return; return;
} }
$url = $this->router->generate( $url = $this->router->generate(
'contao_backend_login', 'contao_backend_login',
['redirect' => $request->getUri()], ['redirect' => $request->getUri()],
UrlGeneratorInterface::ABSOLUTE_URL UrlGeneratorInterface::ABSOLUTE_URL
); );
 End of changes. 3 change blocks. 
12 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)