Permalink
Browse files

Merge pull request #1531 from mahagr/pagination

Fix potentially broken code in JPagination
  • Loading branch information...
2 parents 049b784 + 86f44a8 commit 5da2f904297af52c9dc9b7b5b84131c997ed6ba4 @pasamio pasamio committed Sep 15, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 libraries/joomla/pagination/pagination.php
@@ -707,16 +707,13 @@ protected function _buildDataObject()
{
$offset = ($i - 1) * $this->limit;
- // Set the empty for removal from route
- // @todo remove code: $offset = $offset == 0 ? '' : $offset;
-
$data->pages[$i] = new JPaginationObject($i, $this->prefix);
if ($i != $this->pagesCurrent || $this->viewall)
{
$data->pages[$i]->base = $offset;
$data->pages[$i]->link = JRoute::_($params . '&' . $this->prefix . 'limitstart=' . $offset);
}
- elseif ($i = $this->pagesCurrent)
+ else
{
$data->pages[$i]->active = true;
}

0 comments on commit 5da2f90

Please sign in to comment.