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.
This commit is contained in:
Markus Koch 2018-05-13 12:08:09 +02:00
parent 3587f38bac
commit f364393124
1 changed files with 13 additions and 11 deletions

View File

@ -254,11 +254,12 @@
if ($v->isPublic) { if ($v->isPublic) {
if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) { if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) {
if ($i++ >= $postsSkip) { if ($i++ >= $postsSkip) {
if (isset($CMS_RSS)) { if ($morePosts == 0) {
if (!isset($latestDisplayedPost)) { if (isset($CMS_RSS)) {
$latestDisplayedPost = $v->ctime; if (!isset($latestDisplayedPost)) {
} $latestDisplayedPost = $v->ctime;
echo '<item> }
echo '<item>
<title>' . $v->title . '</title> <title>' . $v->title . '</title>
<description><![CDATA['; <description><![CDATA[';
require $v->includeFile; require $v->includeFile;
@ -269,12 +270,13 @@
<pubDate>' . date(RSS_DATE_FORMAT, $v->ctime) . '</pubDate> <pubDate>' . date(RSS_DATE_FORMAT, $v->ctime) . '</pubDate>
<dc:creator>' . $v->author . '</dc:creator> <dc:creator>' . $v->author . '</dc:creator>
</item>'; </item>';
} else { } else {
echo '<div class="post">'; echo '<div class="post">';
require $v->includeFile; require $v->includeFile;
renderFooter(); renderFooter();
echo "</div>"; echo "</div>";
echo '<hr class="postSeparator">'; echo '<hr class="postSeparator">';
}
} }
if (($i % POSTS_PAGE_SIZE) == 0) { if (($i % POSTS_PAGE_SIZE) == 0) {
$morePosts = 1; $morePosts = 1;