summaryrefslogtreecommitdiff
path: root/public/create/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/create/index.php')
-rw-r--r--public/create/index.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/public/create/index.php b/public/create/index.php
index 786b8f2..7464f71 100644
--- a/public/create/index.php
+++ b/public/create/index.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
use DTS\Bookmark;
use DTS\Errors;
+use DTS\Old;
use DTS\Session;
use DTS\Template;
@@ -19,6 +20,8 @@ if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') !== 'GET') {
respondAndExit(405, 'Method Not Allowed');
}
+$old = $session->get('old', new Old());
+
$errors = $session->get('errors', new Errors());
$template = new Template($config['path_to_templates']);
@@ -27,7 +30,8 @@ $bookmark = new Bookmark();
$html = $template->render('create', compact(
'bookmark',
- 'errors'
+ 'errors',
+ 'old'
));
respondAndExit(200, 'OK', $html);