Loading...
 
Skip to main content

last forum post module does not display posts

Status
Closed
Subject
last forum post module does not display posts
Version
4.x
Category
  • Usability
  • Regression
Feature
Forum
Modules
Submitted by
matoc
Lastmod by
Philippe Cloutier
Rating
(0)
Description
The last forum post module will not display any post unless you are logged in as admin.
Solution
This is a duplicate of ticket 2687.
Workaround

Tried fixing it properly but the attempt failed. See svn diff below. Anyway, commenting the perm check out, plus adding the other minor fixes worksaround (but essentially disables perm checking for filtering the list).

Copy to clipboard
Index: lib/rankings/ranklib.php =================================================================== --- lib/rankings/ranklib.php (revision 26060) +++ lib/rankings/ranklib.php (working copy) @@ -155,13 +155,14 @@ $count = 0; $ret = array(); $result = $commentslib->get_all_comments( 'forum', 0, $limit, 'commentDate_desc' ); - $result['data'] = Perms::filter( array( 'type' => 'forum' ), 'object', $result['data'], array( 'object' => 'forumId', 'forum_read' ) ); + // tried this -> changing forumId to object but did not work + //$result['data'] = Perms::filter( array( 'type' => 'forum' ), 'object', $result['data'], array( 'object' => 'object', 'forum_read' ) ); foreach( $result['data'] as $res ) { - $aux['name'] = $res['name'] . ': ' . $res['title']; + $aux['name'] = $res['title']; // removed the preceding 'name' as it is not is the query $aux['title'] = $res['title']; $tmp = $res['parentId']; if ($tmp == 0) $tmp = $res['threadId']; - $aux['href'] = 'tiki-view_forum_thread.php?forumId=' . $res['forumId'] . '&comments_parentId=' . $tmp; + $aux['href'] = 'tiki-view_forum_thread.php?forumId=' . $res['object'] . '&comments_parentId=' . $tmp; $aux['hits'] = $this->get_long_datetime($res['commentDate']); $tmp = $res['parentId']; if ($tmp == 0) $tmp = $res['threadId'];
Importance
3
Priority
15
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3076
Created
Thursday 11 March, 2010 04:38:10 UTC
by matoc
LastModif
Monday 08 November, 2010 06:32:31 UTC


Show PHP error messages