summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-29 16:21:25 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-29 21:52:07 +0200
commitcc01c906ba63b3797bf2b9ef92a6854fe2ddbefb (patch)
treeea819678100f6a50d67f1f8516e82fdef8a9196b /public
parent73175e2b64c85c7a8c528c76452cd82ffa99f925 (diff)
#336: Integration of symfony/http-foundation request
Diffstat (limited to 'public')
-rw-r--r--public/index.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/public/index.php b/public/index.php
index 10fecaff..a83ab5e8 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,4 +1,7 @@
<?php
+
+use Engelsystem\Http\Request;
+
require_once realpath(__DIR__ . '/../includes/engelsystem_provider.php');
$free_pages = [
@@ -24,12 +27,13 @@ $page = '';
$title = '';
$content = '';
-$page = $request->input('p');
+/** @var Request $request */
+$page = $request->query->get('p');
if (empty($page)) {
$page = $request->path();
$page = str_replace('-', '_', $page);
}
-if (empty($page)) {
+if ($page == '/') {
$page = isset($user) ? 'news' : 'login';
}