1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-05 05:37:45 +02:00

Version 1.2.19: Modularized Visual Editor

This commit is contained in:
trendschau
2019-11-24 07:25:04 +01:00
parent e1c16529e5
commit 126106bccb
54 changed files with 801 additions and 1465 deletions

View File

@@ -10,16 +10,19 @@ class RedirectIfAuthenticated
{
protected $router;
public function __construct(RouterInterface $router)
public function __construct(RouterInterface $router, $settings)
{
$this->router = $router;
$this->settings = $settings;
}
public function __invoke(Request $request, Response $response, $next)
{
$editor = (isset($this->settings['editor']) && $this->settings['editor'] == 'visual') ? 'visual' : 'raw';
if(isset($_SESSION['login']))
{
$response = $response->withRedirect($this->router->pathFor('content.raw'));
$response = $response->withRedirect($this->router->pathFor('content.' . $editor));
}
return $next($request, $response);