From afc1302be668997cc352c2ab58186300c15974c5 Mon Sep 17 00:00:00 2001
From: ben
Date: Sat, 1 Nov 2008 14:25:13 +0000
Subject: Latest discussion fix
git-svn-id: https://code.elgg.org/elgg/trunk@2377 36083f99-b078-4883-b0ff-0f9b5a30f544
---
mod/groups/views/default/object/groupforumtopic.php | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
(limited to 'mod/groups/views/default')
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 23afe00e0..949a1b8e2 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -14,9 +14,11 @@
$title = $vars['entity']->title;
$description = autop($vars['entity']->description);
$group = get_entity($vars['entity']->container_guid);
- $forum_created = friendly_time($vars['entity']->time_created);
+ $forum_created = friendly_time($vars['entity']->time_created);
+ if (isloggedin()) {
$counter = $vars['entity']->countAnnotations("group_topic_post");
- $last_post = $vars['entity']->getAnnotations("group_topic_post", 1, 0, "desc");
+ $last_post = $vars['entity']->getAnnotations("group_topic_post", 1, 0, "desc");
+ }
//get the time and user
foreach($last_post as $last){
$last_time = $last->time_created;
@@ -30,8 +32,9 @@
$info .= '
';
//get the group avatar
$icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'small'));
- //get the group and topic title
- $info .= "" . elgg_echo('group') . ": getURL()}\">{$group->name}
";
+ //get the group and topic title
+ if ($group instanceof ElggGroup)
+ $info .= "" . elgg_echo('group') . ": getURL()}\">{$group->name}
";
$info .= "" . elgg_echo('topic') . ": guid}&group_guid={$group->guid}\">{$title}
";
//get the forum description
--
cgit v1.2.3