@@ -6,11 +6,11 @@ |
||
6 | 6 | |
7 | 7 | class ImprintController extends Controller |
8 | 8 | { |
9 | - public function index() |
|
10 | - { |
|
9 | + public function index() |
|
10 | + { |
|
11 | 11 | $context = [ |
12 | 12 | |
13 | 13 | ]; |
14 | 14 | return $this->PugView->render('website/pages/imprint', $context); |
15 | - } |
|
15 | + } |
|
16 | 16 | } |
@@ -6,11 +6,11 @@ |
||
6 | 6 | |
7 | 7 | class ContactController extends Controller |
8 | 8 | { |
9 | - public function index() |
|
10 | - { |
|
9 | + public function index() |
|
10 | + { |
|
11 | 11 | $context = [ |
12 | 12 | |
13 | 13 | ]; |
14 | 14 | return $this->PugView->render('website/pages/contact', $context); |
15 | - } |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | \ No newline at end of file |
@@ -6,11 +6,11 @@ |
||
6 | 6 | |
7 | 7 | class HomeController extends Controller |
8 | 8 | { |
9 | - public function index() |
|
10 | - { |
|
9 | + public function index() |
|
10 | + { |
|
11 | 11 | $context = [ |
12 | 12 | |
13 | 13 | ]; |
14 | 14 | return $this->PugView->render('website/pages/home', $context); |
15 | - } |
|
15 | + } |
|
16 | 16 | } |
@@ -6,11 +6,11 @@ |
||
6 | 6 | |
7 | 7 | class NotfoundController extends Controller |
8 | 8 | { |
9 | - public function index() |
|
10 | - { |
|
9 | + public function index() |
|
10 | + { |
|
11 | 11 | $context = [ |
12 | 12 | |
13 | 13 | ]; |
14 | 14 | return $this->PugView->render('notFound', $context); |
15 | - } |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | \ No newline at end of file |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | interface MiddlewaresInterface |
8 | 8 | { |
9 | - public function handle(Application $app, $nex); |
|
9 | + public function handle(Application $app, $nex); |
|
10 | 10 | } |
11 | 11 | \ No newline at end of file |
@@ -7,28 +7,28 @@ |
||
7 | 7 | |
8 | 8 | class AuthenticateMiddleware implements Middleware |
9 | 9 | { |
10 | - public function handle(Application $app, $next) |
|
11 | - { |
|
10 | + public function handle(Application $app, $next) |
|
11 | + { |
|
12 | 12 | $request = $app->request->url(); |
13 | 13 | |
14 | 14 | $login = $app->load->model('Login'); |
15 | 15 | |
16 | 16 | $pagesWhenLogout = [ |
17 | - '/login', |
|
18 | - '/login/submit', |
|
19 | - '/registration', |
|
20 | - '/registration/submit' |
|
17 | + '/login', |
|
18 | + '/login/submit', |
|
19 | + '/registration', |
|
20 | + '/registration/submit' |
|
21 | 21 | ]; |
22 | 22 | |
23 | 23 | if ($login->isLogged()) { |
24 | 24 | |
25 | - if (in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
25 | + if (in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
26 | 26 | |
27 | 27 | } else { |
28 | 28 | |
29 | - if (! in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
29 | + if (! in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | return $next; |
33 | - } |
|
33 | + } |
|
34 | 34 | } |
35 | 35 | \ No newline at end of file |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | } else { |
28 | 28 | |
29 | - if (! in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
29 | + if (!in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | return $next; |
@@ -22,11 +22,15 @@ |
||
22 | 22 | |
23 | 23 | if ($login->isLogged()) { |
24 | 24 | |
25 | - if (in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
25 | + if (in_array($request, $pagesWhenLogout)) { |
|
26 | + $app->url->redirectTo('/'); |
|
27 | + } |
|
26 | 28 | |
27 | 29 | } else { |
28 | 30 | |
29 | - if (! in_array($request, $pagesWhenLogout)) $app->url->redirectTo('/'); |
|
31 | + if (! in_array($request, $pagesWhenLogout)) { |
|
32 | + $app->url->redirectTo('/'); |
|
33 | + } |
|
30 | 34 | } |
31 | 35 | |
32 | 36 | return $next; |
@@ -7,8 +7,8 @@ |
||
7 | 7 | |
8 | 8 | class PermissionsMiddleware implements Middleware |
9 | 9 | { |
10 | - public function handle(Application $app, $next) |
|
11 | - { |
|
10 | + public function handle(Application $app, $next) |
|
11 | + { |
|
12 | 12 | |
13 | - } |
|
13 | + } |
|
14 | 14 | } |
15 | 15 | \ No newline at end of file |
@@ -10,13 +10,13 @@ |
||
10 | 10 | public function handle(Application $app, $next) |
11 | 11 | { |
12 | 12 | |
13 | - if (! $this->session->has('error') || $this->session->get('error') != true) { |
|
13 | + if (! $this->session->has('error') || $this->session->get('error') != true) { |
|
14 | 14 | |
15 | 15 | $this->url->redirectTo('/'); |
16 | 16 | |
17 | - } else { |
|
17 | + } else { |
|
18 | 18 | |
19 | - $this->session->remove('error'); |
|
20 | - } |
|
19 | + $this->session->remove('error'); |
|
20 | + } |
|
21 | 21 | } |
22 | 22 | } |
23 | 23 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
10 | 10 | public function handle(Application $app, $next) |
11 | 11 | { |
12 | 12 | |
13 | - if (! $this->session->has('error') || $this->session->get('error') != true) { |
|
13 | + if (!$this->session->has('error') || $this->session->get('error') != true) { |
|
14 | 14 | |
15 | 15 | $this->url->redirectTo('/'); |
16 | 16 |
@@ -7,8 +7,8 @@ |
||
7 | 7 | |
8 | 8 | class AjaxMiddleware implements Middleware |
9 | 9 | { |
10 | - public function handle(Application $app, $next) |
|
11 | - { |
|
10 | + public function handle(Application $app, $next) |
|
11 | + { |
|
12 | 12 | // if(empty($_SERVER['HTTP_X_REQUESTED_WITH'])) $this->url->redirectTo('error'); |
13 | - } |
|
13 | + } |
|
14 | 14 | } |
15 | 15 | \ No newline at end of file |