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 <richard.mansfield@catalyst.net.nz>
parent 9af5e76f
......@@ -615,7 +615,7 @@ EOF;
$select = '
SELECT
t.id, t.forum AS forumid, f.title AS forumname, g.id AS groupid, g.name AS groupname,
t.id, t.forum AS forumid, f.title AS forumname, g.id AS groupid, g.name AS groupname, g.urlid,
first.subject AS topicname, first.poster AS firstpostby,
last.id AS postid, last.poster, last.subject, last.body, last.ctime, edits.ctime as mtime,
COUNT(posts.id) AS postcount';
......@@ -626,13 +626,17 @@ EOF;
$sort = '
GROUP BY
t.id, t.forum, f.title, g.id, g.name,
t.id, t.forum, f.title, g.id, g.name, g.urlid,
first.subject, first.poster,
last.id, 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 @@
<td>
<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>
</div>
</td>
......
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