Merge pull request #628 from th-h/thh-pagination
Fix prev/next page links for stable archives.
This commit is contained in:
commit
6253c03ad9
@ -1,6 +1,9 @@
|
||||
Version 2.4-alpha1
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Change footer_info and prev/next links for archive pages for
|
||||
"stable archives" sort order.
|
||||
|
||||
* Fix pagination in core for "stable archives" sort order and fix
|
||||
prev/next links for pagination in timeline and bulletproof themes
|
||||
when "stable archives" are active.
|
||||
|
@ -975,7 +975,7 @@ function serendipity_printEntryFooter($suffix = '.html', $totalEntries = null) {
|
||||
$serendipity['smarty']->assign('footer_totalPages', $totalPages);
|
||||
$serendipity['smarty']->assign('footer_currentPage', $serendipity['GET']['page']);
|
||||
$serendipity['smarty']->assign('footer_pageLink', str_replace('%2A', '*', serendipity_rewriteURL(implode('/', $uriArguments) . $suffix)));
|
||||
$serendipity['smarty']->assign('footer_info', sprintf(PAGE_BROWSE_ENTRIES, serendipity_db_bool($serendipity['archiveSortStable']) && $serendipity['GET']['action'] != 'search' ? $totalPages - (int)$serendipity['GET']['page'] +1 : (int)$serendipity['GET']['page'], $totalPages, $totalEntries));
|
||||
$serendipity['smarty']->assign('footer_info', sprintf(PAGE_BROWSE_ENTRIES, (int)$serendipity['GET']['page'], $totalPages, $totalEntries));
|
||||
|
||||
if ($serendipity['GET']['page'] < $totalPages) {
|
||||
$uriArguments = $serendipity['uriArguments'];
|
||||
@ -983,11 +983,6 @@ function serendipity_printEntryFooter($suffix = '.html', $totalEntries = null) {
|
||||
$serendipity['smarty']->assign('footer_next_page', serendipity_rewriteURL(str_replace('//', '/', implode('/', $uriArguments)) . $suffix));
|
||||
}
|
||||
|
||||
if (serendipity_db_bool($serendipity['archiveSortStable']) && $serendipity['GET']['action'] != 'search') {
|
||||
$temp = $serendipity['smarty']->getTemplateVars('footer_prev_page');
|
||||
$serendipity['smarty']->assign('footer_prev_page', $serendipity['smarty']->getTemplateVars('footer_next_page'));
|
||||
$serendipity['smarty']->assign('footer_next_page', $temp);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user