Commit 6a2b2e35 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Use clean group urls on group topics page

Bug #1006634, part 3

For the linked group names listed in Groups -> Topics

Change-Id: I7cf0105ec08f8025568ea2ae83218b9a68e85500
Signed-off-by: default avatarRichard Mansfield <>
parent 9af5e76f
......@@ -615,7 +615,7 @@ EOF;
$select = '
SELECT, AS forumid, f.title AS forumname, AS groupid, AS groupname,, AS forumid, f.title AS forumname, AS groupid, AS groupname, g.urlid,
first.subject AS topicname, first.poster AS firstpostby, AS postid, last.poster, last.subject, last.body, last.ctime, edits.ctime as mtime,
COUNT( AS postcount';
......@@ -626,13 +626,17 @@ EOF;
$sort = '
GROUP BY,, f.title,,,,, f.title,,, g.urlid,
first.subject, first.poster,, last.poster, last.subject, last.body, last.ctime, edits.ctime
ORDER BY last.ctime DESC';
$result['data'] = get_records_sql_array($select . $from . $where . $sort, $values, $offset, $limit);
foreach($result['data'] as &$r) {
$r->groupurl = group_homepage_url((object) array('id' => $r->groupid, 'urlid' => $r->urlid));
return $result;
......@@ -3,7 +3,7 @@
<div class="topictitle"><a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}">{$topic->topicname|str_shorten_text:65:true}</a></div>
<div class="s">
<a href="{$WWWROOT}group/view.php?id={$topic->groupid}" class="topicgroup">{$topic->groupname|str_shorten_text:30:true}</a> >
<a href="{$topic->groupurl}" class="topicgroup">{$topic->groupname|str_shorten_text:30:true}</a> >
<a href="{$WWWROOT}interaction/forum/view.php?id={$topic->forumid}" class="topicforum">{$topic->forumname|str_shorten_text:30:true}</a>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment