Only show blog posts if their cdate has been reached

This commit is contained in:
Markus Koch 2018-05-13 12:24:09 +02:00
parent f364393124
commit d3ec880dc7

View File

@ -97,9 +97,10 @@
$blogentry->tags = explode(',', $blogentry->tags);
sort($blogentry->tags);
$blogentry->permalink = getServerUrl() . "/?p=blog&b=" . str_replace("/", POSTS_DIR_SEP, $blogentry->file);
$blogentry->isPublic = ($blogentry->status == "released");
$blogentry->isVisible = ($blogentry->ctime <= time()) && (($blogentry->status == "released") || ($blogentry->status == "unlisted"));
$blogentry->isPublic = ($blogentry->status == "released") && $blogentry->isVisible;
}
$renderIt = $CMS_INDEXING || ($blogentry->status == "released") || ($blogentry->status == "unlisted");
$renderIt = $CMS_INDEXING || $blogentry->isVisible;
if ($renderIt && !isset($CMS_RSS)) {
if (isset($postUrl) && !$CMS_INDEXING) { // Set meta information