From f3643931243e0fd4e45b6ea635e6d2a05a8d5653 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sun, 13 May 2018 12:08:09 +0200 Subject: [PATCH] Fix post pagebreak once again The first article of a page was also displayed on the bottom of the previous one. This commit fixes this behavior. --- blog.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/blog.php b/blog.php index 1c61f97..ffa318e 100644 --- a/blog.php +++ b/blog.php @@ -254,11 +254,12 @@ if ($v->isPublic) { if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) { if ($i++ >= $postsSkip) { - if (isset($CMS_RSS)) { - if (!isset($latestDisplayedPost)) { - $latestDisplayedPost = $v->ctime; - } - echo ' + if ($morePosts == 0) { + if (isset($CMS_RSS)) { + if (!isset($latestDisplayedPost)) { + $latestDisplayedPost = $v->ctime; + } + echo ' ' . $v->title . ' includeFile; @@ -269,12 +270,13 @@ ' . date(RSS_DATE_FORMAT, $v->ctime) . ' ' . $v->author . ' '; - } else { - echo '
'; - require $v->includeFile; - renderFooter(); - echo "
"; - echo '
'; + } else { + echo '
'; + require $v->includeFile; + renderFooter(); + echo "
"; + echo '
'; + } } if (($i % POSTS_PAGE_SIZE) == 0) { $morePosts = 1;