From d7b9df67339ff1974c761b10028962abea70715e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 5 May 2019 13:00:39 +0200 Subject: [PATCH] fix pre-filled tags in doc upload --- www/_templates/admin_doc_edit.php | 2 +- www/admin.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/www/_templates/admin_doc_edit.php b/www/_templates/admin_doc_edit.php index 5f8ee3f..18803e2 100644 --- a/www/_templates/admin_doc_edit.php +++ b/www/_templates/admin_doc_edit.php @@ -19,7 +19,7 @@ } echo implode(", ", $tags); } else if (!empty($_GET["tag"])) { - echo $_GET["tag"]; + echo $tag["Name"]; } ?>">
diff --git a/www/admin.php b/www/admin.php index 39fd4a1..08ebee5 100644 --- a/www/admin.php +++ b/www/admin.php @@ -39,6 +39,9 @@ if (isset($_SESSION['ID'])) { } break; case "new_item": + if (!empty($_GET["tag"])) { + $page->tag = $db->fetchTag($_GET["tag"]); + } $content = $page->render("admin_doc_edit.php"); break; case "edit_item":