nieuws: avoid invalid date access for missing articles
[minimedit.git] / nieuws / index.php
index 9e972676ffd8eccc974e8cd41f2ca764b8cd3962..3a50265955977b618d71c73c28cf5afea7151a01 100644 (file)
@@ -11,7 +11,9 @@ if ($page and !is_numeric($page)) {
        if ($edit) {
                $Article->title = $edit;
        }
-       $Place[1] = ' <small class="date">'.$Article->date.'</small>';
+       if ($Article->dateparts) {
+               $Place[1] = ' <small class="date">'.$Article->date.'</small>';
+       }
        print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', ob_get_clean());
        if ($User and $User->admin('news')) {
                $taglist = [];
@@ -35,7 +37,7 @@ if ($page and !is_numeric($page)) {
                }
        }
        if ($replyform) {
-               print placeholder_include('nieuws/replies');
+               print placeholder_include('reply');
        }
        return 1;
 }