From d99f1028ce873ab99c345dcea5b4fba67d73203d Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 22 Apr 2009 13:41:16 +0000 Subject: Closes #957: Groups topics now handle deleted users, I recommend that people look at what I've done and handle deleted users in a similar way in their plugins. git-svn-id: https://code.elgg.org/elgg/trunk@3226 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/object/groupforumtopic.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/groups/views/default/object') diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index 021d139ca..a6d214fcf 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -29,12 +29,12 @@ } $u = get_user($last_user); - + //select the correct output depending on where you are if(get_context() == "search"){ $info = "

" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "
"; - if ($last_time) $info.= sprintf(elgg_echo('groups:lastupdated'), friendly_time($last_time), " getURL() . "\">" . $u->name . ""); + if (($last_time) && ($u)) $info.= sprintf(elgg_echo('groups:lastupdated'), friendly_time($last_time), " getURL() . "\">" . $u->name . ""); $info .= '

'; //get the group avatar $icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'small')); @@ -49,7 +49,7 @@ }else{ $info = "" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . ""; - if ($last_time) $info.= "
" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by getURL() . "\">" . $u->name . ""; + if (($last_time) && ($u)) $info.= "
" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by getURL() . "\">" . $u->name . ""; if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) { -- cgit v1.2.3