Bug #7673
not going to last_post for list_unread with multiple pages
| Status: | Resolved | Start date: | 2010-05-05 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | 2010-08-07 | |
| Assignee: | Peter Schuster | % Done: | 100% |
|
| Category: | Forum | |||
| Target version: | 1.9.2 | |||
| Votes: | 0 |
Description
when list unread is shown (and others), the goto last post link does not work if there are multiple pages for that topic. Instead it goes to the first page with [page]=#1234. It should be set to [page]=1#1234 if on page 2 or [page]=2#1234 if on page 3, etc.
In digging in the code, I found that the problem I was having was with get_pid_link() function. It seems that for the initial grab of all posts in the given topic, it does not sort them. So, for my database setup, they were being grabbed arbitrarily. So I set the ORDER BY in the mySQL call to 'uid' and this seems to work fine. I do not know internal structure if there is something better to ORDER BY.
To fix it, I added the limit in get_pid_link() on line 4828:
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid','tx_mmforum_posts',"deleted=0 AND hidden=0 AND topic_id='$topic_id'".$this->getStoragePIDQuery(),'','uid');
-Dave
Associated revisions
[#BUGFIX] Wrong calculation of page number for last post link. (fixes #7673, thanks to David Slayback)
[#BUGFIX] Wrong calculation of page number for last post link. (fixes #7673, thanks to David Slayback)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/mm_forum/branches/1.9.x@36460 735d13b6-9817-0410-8766-e36946ffe9aa
[#BUGFIX] Wrong calculation of page number for last post link. (fixes #7673, thanks to David Slayback)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/mm_forum/trunk@36460 735d13b6-9817-0410-8766-e36946ffe9aa
History
Updated by Hauke Hain almost 3 years ago
- Status changed from New to Accepted
Updated by Peter Schuster almost 3 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r36460.
Updated by Peter Schuster almost 3 years ago
- Due date set to 2010-08-07
- Category set to Forum
- Assignee set to Peter Schuster
- Target version set to 1.9.2