nieuws: hide empty tag lists
[minimedit.git] / nieuws / index.php
index ad85011716c9825248995d28d4573d12ac67a5c8..746baec4869bd6f7be2abe1223fefe78cb1a54bf 100644 (file)
@@ -13,7 +13,7 @@ if ($page and !is_numeric($page)) {
        $article = new ArchiveArticle("$Page$Args.html");
        $Place[1] = ' <small class="date">'.$article->date.'</small>';
        print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', ob_get_clean());
-       if ($article->image) {
+       if ($article->file and $article->image) {
                $Place['image'] = "https://lijtweg.nl/".$article->thumb('600x');
        }
        if (!empty($User['admin'])) {
@@ -31,9 +31,11 @@ if ($page and !is_numeric($page)) {
                                ucfirst($tagname)
                        );
                }
-               printf('<p class="tags"><strong>Tags:</strong> %s</p>'."\n",
-                       implode("\n\t", $taglist)
-               );
+               if ($taglist) {
+                       printf('<p class="tags"><strong>Tags:</strong> %s</p>'."\n",
+                               implode("\n\t", $taglist)
+                       );
+               }
        }
        if ($replyform) {
                print placeholder_include('nieuws/replies');