Opened 16 years ago
Closed 16 years ago
#2536 closed defect (bug) (fixed)
posts_nav_link inserts $sep too often
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0.1 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
<?php posts_nav_link(' ','Previous Resu
lts','More Results') ?></div>
The proper behaviour should be to *only* insert sep if there are both previous and next results. Otherwise, sep should not be echoed.
Attachments (1)
Change History (9)
#2
@
16 years ago
- Owner changed from anonymous to davidhouse
- Status changed from new to assigned
- Summary changed from posts_nav_link is dumb to posts_nav_link inserts $sep too often
#3
@
16 years ago
Patch attached, which:
- Fixes the bug for both paging by dates and posts.
- Refactors post_nav_link() and friends to use less globals.
- Makes paging by dates smart enough to know what the maximum number of days is.
#4
@
16 years ago
Maybe we should call it _max_num_pages() to denote it is a private helper function.
#5
@
16 years ago
If you want. I thought there was a possibility of it being used elsewhere, but actually that's not very likely.
Note: See
TracTickets for help on using
tickets.
Paging by posts or by days. I think our paging by days query is not smart enough to determine if there are any days left so the next link is always shown.