summaryrefslogtreecommitdiff
path: root/src/Middleware/LegacyMiddleware.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Middleware/LegacyMiddleware.php')
-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);
}
}