summaryrefslogtreecommitdiff
path: root/src/Middleware
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-02 02:09:56 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-02 02:09:56 +0200
commit9e217d87c095170460a8580d5215ddf7cbe639f4 (patch)
tree3b426fe52e70ef0f1395edcb354f1be4788ca329 /src/Middleware
parentac48332166ce28fcb1a2fc130c7f5adbc760e42d (diff)
Template refactoring to use twig
Diffstat (limited to 'src/Middleware')
-rw-r--r--src/Middleware/LegacyMiddleware.php19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/Middleware/LegacyMiddleware.php b/src/Middleware/LegacyMiddleware.php
index f4d6bbcc..f8c2a205 100644
--- a/src/Middleware/LegacyMiddleware.php
+++ b/src/Middleware/LegacyMiddleware.php
@@ -60,6 +60,7 @@ class LegacyMiddleware implements MiddlewareInterface
): ResponseInterface {
global $user;
global $privileges;
+ global $page;
/** @var Request $appRequest */
$appRequest = $this->container->get('request');
@@ -271,27 +272,13 @@ class LegacyMiddleware implements MiddlewareInterface
*/
protected function renderPage($page, $title, $content)
{
- global $user;
- $event_config = EventConfig();
- $parameters = [
- 'key' => (isset($user) ? $user['api_key'] : ''),
- ];
-
- if ($page == 'user_meetings') {
- $parameters['meetings'] = 1;
- }
-
if (!empty($page) && is_int($page)) {
return response($content, (int)$page);
}
return response(view('layouts/app', [
- 'title' => $title,
- 'atom_feed' => ($page == 'news' || $page == 'user_meetings') ? $parameters : [],
- 'menu' => make_menu(),
- 'content' => msg() . $content,
- 'header_toolbar' => header_toolbar(),
- 'event_info' => EventConfig_info($event_config) . ' <br />'
+ 'title' => $title,
+ 'content' => msg() . $content,
]), 200);
}
}