Only render postSeparator if appropriate

This commit is contained in:
Markus Koch 2020-05-22 12:39:34 +02:00
parent 688c645ac4
commit 4bbbe66691

View File

@ -261,6 +261,7 @@
}
$i = 0;
$morePosts = 0;
$firstRendered = 0;
foreach($posts as $k=>$v) {
if ($v->isPublic) {
if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) {
@ -282,11 +283,14 @@
<dc:creator>' . $v->author . '</dc:creator>
</item>';
} else {
if ($firstRendered) {
echo '<hr class="postSeparator">';
}
$firstRendered = 1;
echo '<div class="post">';
require $v->includeFile;
renderFooter();
echo "</div>";
echo '<hr class="postSeparator">';
}
}
if (($i % POSTS_PAGE_SIZE) == 0) {