fallback to addressing by tag name in public-facing side

This commit is contained in:
Tomáš Mládek 2019-04-30 19:16:58 +02:00 committed by Tomáš Mládek
parent deb0d071bb
commit c7fc645fde

View file

@ -22,6 +22,9 @@ if (isset($_GET["item"])) {
$docs = $db->listDocs(-1); $docs = $db->listDocs(-1);
} else { } else {
$tag = $db->fetchTag($_GET["tag"]); $tag = $db->fetchTag($_GET["tag"]);
if (!$tag) {
$tag = $db->findTag($_GET["tag"]);
}
$docs = $db->listDocs($tag["ID"]); $docs = $db->listDocs($tag["ID"]);
$tag["Description"] = $pd->text($tag["Description"]); $tag["Description"] = $pd->text($tag["Description"]);
$doc_list_template->tag = $tag; $doc_list_template->tag = $tag;