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":