From d9a7f8ee70bdd5a5a596a5bb745c8d11391105e9 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 15 Jul 2008 10:49:19 +0000 Subject: Using ElggRiverStatement. Plugin writers update your views! Refs #135. git-svn-id: https://code.elgg.org/elgg/trunk@1422 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../default/river/ElggRelationship/create.php | 24 +++++++++++----------- .../views/default/river/ElggUser/update.php | 12 ++++++----- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'mod') diff --git a/mod/groups/views/default/river/ElggRelationship/create.php b/mod/groups/views/default/river/ElggRelationship/create.php index b302097bc..169a9b2aa 100644 --- a/mod/groups/views/default/river/ElggRelationship/create.php +++ b/mod/groups/views/default/river/ElggRelationship/create.php @@ -10,31 +10,31 @@ * @link http://elgg.com/ */ - $performed_by = $vars['performed_by']; - $log_entry = $vars['log_entry']; - $object = $vars['entity']; + $statement = $vars['statement']; - // Find out what type of relationship we're dealing with (will only display a few) - if ($object instanceof ElggRelationship) + $performed_by = $statement->getSubject(); + $event = $statement->getEvent(); + $object = $statement->getObject(); + + if (is_array($object)) { - - switch ($object->relationship) + switch ($object['relationship']) { // Friending case 'member' : - - $user = get_entity($object->guid_one); - $group = get_entity($object->guid_two); - + $user = $object['subject']; + $group = $object['object']; + if (($user instanceof ElggUser) && ($group instanceof ElggGroup)) { echo "getURL()}\">{$user->name} "; echo elgg_echo("groups:river:member"); echo " 'getURL()}\">{$group->title}'"; } - + break; } } + ?> \ No newline at end of file diff --git a/mod/profile/views/default/river/ElggUser/update.php b/mod/profile/views/default/river/ElggUser/update.php index c9b710512..36f775991 100644 --- a/mod/profile/views/default/river/ElggUser/update.php +++ b/mod/profile/views/default/river/ElggUser/update.php @@ -1,10 +1,12 @@ getSubject(); + + $url = "getURL()}\">{$performed_by->name}"; + $string = sprintf(elgg_echo("profile:river:update"),$url); - $url = "getURL()}\">{$performed_by->name}"; - $string = sprintf(elgg_echo("profile:river:update"),$url); - ?> \ No newline at end of file -- cgit v1.2.3