nieuws: ignore missing title during edit
[minimedit.git] / nieuws / index.php
index d56758e55d7ca3c57f4dc2a4dbbe57e82486373a..cf63a63669868bcbd73f5b5e99fdbebf50d5cbe0 100644 (file)
@@ -11,7 +11,7 @@ if (!empty($User['admin'])) {
 if ($page and !is_numeric($page)) {
        $edit = !empty($User['admin']) ? htmlspecialchars(@$_GET['edit']) : NULL;
        $article = new ArchiveArticle("$Page$Args.html");
-       $Place['title'] = $article->title;
+       $Place['title'] = $edit ?: $article->title;
        $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) {