Skip to content

Commit

Permalink
This reverts the previous fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fretzl committed Dec 16, 2014
1 parent f57b4ff commit d0411b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zp-core/zp-extensions/zenpage/zenpage-class-news.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function getIndex($sortorder, $sortdirection, $sticky) {
function getPrevArticle($sortorder = 'date', $sortdirection = false, $sticky = true) {
global $_zp_zenpage, $_zp_current_zenpage_news;
$index = $this->getIndex($sortorder, $sortdirection, $sticky);
$article = $_zp_zenpage->getArticle($index + 1);
$article = $_zp_zenpage->getArticle($index - 1);
return $article;
}

Expand All @@ -359,7 +359,7 @@ function getPrevArticle($sortorder = 'date', $sortdirection = false, $sticky = t
function getNextArticle($sortorder = 'date', $sortdirection = false, $sticky = true) {
global $_zp_zenpage, $_zp_current_zenpage_news;
$index = $this->getIndex($sortorder, $sortdirection, $sticky);
$article = $_zp_zenpage->getArticle($index - 1);
$article = $_zp_zenpage->getArticle($index + 1);
return $article;
}

Expand Down

0 comments on commit d0411b1

Please sign in to comment.