summaryrefslogtreecommitdiff
path: root/public/create
diff options
context:
space:
mode:
authorDavid T. Sadler <davidtsadler@googlemail.com>2021-10-26 21:07:43 +0100
committerDavid T. Sadler <davidtsadler@googlemail.com>2021-10-26 21:07:43 +0100
commitae205d810b62dce5e3e11aef07358c11ded48c77 (patch)
tree0196ae98aefb93b719d6b21cc065e22c1ecf992b /public/create
parentd4122f116c937e0ec509d8cefe540146ec27a0cd (diff)
Implement old
Diffstat (limited to 'public/create')
-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);