aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/river/relationship
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 18:08:53 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 18:08:53 +0000
commit5a396908110b8d9ae358224f15bdbcb9a6c6dfab (patch)
tree985f436b57828fbaae1321567a1dceed7d3eec8a /mod/groups/views/default/river/relationship
parent613748b75a9cd1f1b1939ab05c22e63407237984 (diff)
downloadelgg-5a396908110b8d9ae358224f15bdbcb9a6c6dfab.tar.gz
elgg-5a396908110b8d9ae358224f15bdbcb9a6c6dfab.tar.bz2
Merged [6612] from 1.7 into the trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6844 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/river/relationship')
-rw-r--r--mod/groups/views/default/river/relationship/member/create.php50
1 files changed, 12 insertions, 38 deletions
diff --git a/mod/groups/views/default/river/relationship/member/create.php b/mod/groups/views/default/river/relationship/member/create.php
index e5e318ce0..a568920cc 100644
--- a/mod/groups/views/default/river/relationship/member/create.php
+++ b/mod/groups/views/default/river/relationship/member/create.php
@@ -1,40 +1,14 @@
<?php
- /**
- * Elgg relationship create event for groups
- * Display something in the river when a group is joined
- *
- * @package ElggGroups
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- */
- $statement = $vars['statement'];
-
- $performed_by = $statement->getSubject();
- $event = $statement->getEvent();
- $object = $statement->getObject();
-
- if (is_array($object))
- {
- switch ($object['relationship'])
- {
- // Friending
- case 'member' :
- $user = $object['subject'];
- $group = $object['object'];
-
- if (($user instanceof ElggUser) && ($group instanceof ElggGroup))
- {
- echo "<a href=\"{$user->getURL()}\">{$user->name}</a> ";
- echo elgg_echo("groups:river:member");
- echo " '<a href=\"{$group->getURL()}\">{$group->name}</a>'";
- }
-
- break;
- }
- }
-
-
-?> \ No newline at end of file
+ $performed_by = get_entity($vars['item']->subject_guid);
+ $object = get_entity($vars['item']->object_guid);
+ $objecturl = $object->getURL();
+
+ $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
+ $string = sprintf(elgg_echo("groups:river:member"),$url) . " ";
+ $string .= " <a href=\"" . $object->getURL() . "\">" . $object->name . "</a>";
+ $string .= " <span class='entity_subtext'>". elgg_view_friendly_time($vars['item']->posted);
+ $string .= "</span>";
+?>
+
+<?php echo $string; ?> \ No newline at end of file