diff --git a/www/_templates/admin_doc_listing.php b/www/_templates/admin_doc_listing.php
index d79dacb..c1e1f03 100644
--- a/www/_templates/admin_doc_listing.php
+++ b/www/_templates/admin_doc_listing.php
@@ -10,7 +10,7 @@
-
">
+ ">
Upload a new document
diff --git a/www/_templates/admin_wrap.php b/www/_templates/admin_wrap.php
index 26aadbd..19d7158 100644
--- a/www/_templates/admin_wrap.php
+++ b/www/_templates/admin_wrap.php
@@ -24,7 +24,7 @@
diff --git a/www/_templates/front_doc_overview.php b/www/_templates/front_doc_overview.php
index 83fbf18..5c491ba 100644
--- a/www/_templates/front_doc_overview.php
+++ b/www/_templates/front_doc_overview.php
@@ -13,7 +13,7 @@
" . $tag["Name"] . "";
}
?>
diff --git a/www/_templates/front_wrap.php b/www/_templates/front_wrap.php
index 825d21b..6f44c90 100644
--- a/www/_templates/front_wrap.php
+++ b/www/_templates/front_wrap.php
@@ -25,7 +25,7 @@
0) {
- echo '" . $tag['name'] . " (" . $tag['count'] . ")";
+ echo '" . $tag['name'] . " (" . $tag['count'] . ")";
}
}
?>
diff --git a/www/_util/PileDB.php b/www/_util/PileDB.php
index 68d54c4..f91a570 100644
--- a/www/_util/PileDB.php
+++ b/www/_util/PileDB.php
@@ -51,7 +51,7 @@ class PileDB
$tags = [];
while ($row = $tags_ret->fetchArray(SQLITE3_NUM)) {
array_push($tags, array(
- 'href' => $row[0],
+ 'id' => $row[0],
'name' => $row[1],
'count' => $row[2]
));
diff --git a/www/admin.php b/www/admin.php
index 86ecde6..39fd4a1 100644
--- a/www/admin.php
+++ b/www/admin.php
@@ -114,9 +114,9 @@ if (isset($_SESSION['ID'])) {
} elseif ($_GET["tag"] == "_") {
$docs = $db->listDocs(-1);
} else {
- $tag = $db->findTag($_GET["tag"]);
+ $tag = $db->fetchTag($_GET["tag"]);
$docs = $db->listDocs($tag["ID"]);
- $doc_list_template->tag = $db->fetchTag($tag["ID"]);
+ $doc_list_template->tag = $tag;
}
$doc_list_template->docs = $docs;
$content = $doc_list_template->render('admin_doc_listing.php');
diff --git a/www/index.php b/www/index.php
index 5438248..fafb644 100644
--- a/www/index.php
+++ b/www/index.php
@@ -21,9 +21,8 @@ if (isset($_GET["item"])) {
} elseif ($_GET["tag"] == "_") {
$docs = $db->listDocs(-1);
} else {
- $tagObj = $db->findTag($_GET["tag"]);
- $docs = $db->listDocs($tagObj["ID"]);
- $tag = $db->fetchTag($tagObj["ID"]);
+ $tag = $db->fetchTag($_GET["tag"]);
+ $docs = $db->listDocs($tag["ID"]);
$tag["Description"] = $pd->text($tag["Description"]);
$doc_list_template->tag = $tag;
}