Fix handling of private posts

Before, a private post would show an empty page with the footer (tags)
at the bottom. Now, a message is shown, and sensitive information is
hidden.
This commit is contained in:
Markus Koch 2018-05-13 12:28:51 +02:00
parent 92e05e4a91
commit a60988f468

View File

@ -228,10 +228,13 @@
echo '<div class="post">'; echo '<div class="post">';
// Header is rendered in renderPost() // Header is rendered in renderPost()
require $postUrl; // This will render the body require $postUrl; // This will render the body
//if ($blogentry->isPublic) { // Render the blog footer if ($blogentry->isVisible) { // Render the blog footer
//echo "<p class=\"author\">Written by $blogentry->author</p>"; //echo "<p class=\"author\">Written by $blogentry->author</p>";
renderFooter(); renderFooter();
//} } else {
echo("<h1>Private Post</h1>");
echo("<p>This post has not yet been made public by the publisher. Please check back again later. Thank you.</p>");
}
echo '</div>'; echo '</div>';
} }
else { else {