nieuws: ignore missing page description in new articles
[minimedit.git] / nieuws / index.php
index 71048d50cc64228b11989ebd56d83f17997d891a..21ee366b22643230f01b4cfc222e93b991f0340d 100644 (file)
@@ -12,7 +12,9 @@ if ($page and !is_numeric($page)) {
        $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL;
        $article = new ArchiveArticle("$Page$Args.html");
        $Place['title'] = $edit ?: $article->title;
-       $Place['description'] = $article->teaser;
+       if ($article->file) {
+               $Place['description'] = $article->teaser;
+       }
        $Place[1] = ' <small class="date">'.$article->date.'</small>';
        print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', ob_get_clean());
        if ($article->file and $article->image) {