Skip to content

Commit

Permalink
https://github.com/opencart/opencart/issues/4637#ref-commit-86de386
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkerr committed Jun 3, 2017
1 parent 8177630 commit 6ecce72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions upload/system/library/pagination.php
Expand Up @@ -33,10 +33,10 @@ public function render() {
$output = '<ul class="pagination">';

if ($page > 1) {
$output .= '<li><a href="' . str_replace(array('page={page}', 'page={page}'), '', $this->url) . '">' . $this->text_first . '</a></li>';
$output .= '<li><a href="' . str_replace(array('&amp;page={page}', '?page={page}', '&page={page}'), '', $this->url) . '">' . $this->text_first . '</a></li>';

if ($page - 1 === 1) {
$output .= '<li><a href="' . str_replace(array('page={page}', 'page={page}'), '', $this->url) . '">' . $this->text_prev . '</a></li>';
$output .= '<li><a href="' . str_replace(array('&amp;page={page}', '?page={page}', '&page={page}'), '', $this->url) . '">' . $this->text_prev . '</a></li>';
} else {
$output .= '<li><a href="' . str_replace('{page}', $page - 1, $this->url) . '">' . $this->text_prev . '</a></li>';
}
Expand Down Expand Up @@ -66,7 +66,7 @@ public function render() {
$output .= '<li class="active"><span>' . $i . '</span></li>';
} else {
if ($i === 1) {
$output .= '<li><a href="' . str_replace(array('page={page}', 'page={page}'), '', $this->url) . '">' . $i . '</a></li>';
$output .= '<li><a href="' . str_replace(array('&amp;page={page}', '?page={page}', '&page={page}'), '', $this->url) . '">' . $i . '</a></li>';
} else {
$output .= '<li><a href="' . str_replace('{page}', $i, $this->url) . '">' . $i . '</a></li>';
}
Expand Down

0 comments on commit 6ecce72

Please sign in to comment.