From ae205d810b62dce5e3e11aef07358c11ded48c77 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Tue, 26 Oct 2021 21:07:43 +0100 Subject: Implement old --- public/edit/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'public/edit') diff --git a/public/edit/index.php b/public/edit/index.php index fba5a90..b1efeec 100644 --- a/public/edit/index.php +++ b/public/edit/index.php @@ -4,6 +4,7 @@ declare(strict_types=1); use DTS\BookmarkRepository; 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()); $id = filter_input(INPUT_GET, 'id'); @@ -35,7 +38,8 @@ if ($bookmark === null) { $html = $template->render('edit', compact( 'bookmark', - 'errors' + 'errors', + 'old' )); respondAndExit(200, 'OK', $html); -- cgit v1.2.3-13-gbd6f