aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
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
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')
-rw-r--r--mod/groups/actions/edit.php2
-rw-r--r--mod/groups/actions/join.php2
-rw-r--r--mod/groups/languages/en.php7
-rw-r--r--mod/groups/views/default/river/group/create.php2
-rw-r--r--mod/groups/views/default/river/relationship/member/create.php50
5 files changed, 18 insertions, 45 deletions
diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php
index 606c00ba7..75cc9354b 100644
--- a/mod/groups/actions/edit.php
+++ b/mod/groups/actions/edit.php
@@ -96,7 +96,7 @@ $group->save();
if ($new_group_flag) {
set_page_owner($group->guid);
$group->join($user);
- add_to_river('river/group/create','create',$user->guid,$group->guid);
+ add_to_river('river/group/create', 'create', $user->guid, $group->guid);
}
diff --git a/mod/groups/actions/join.php b/mod/groups/actions/join.php
index 55da1a17c..5ba0bed78 100644
--- a/mod/groups/actions/join.php
+++ b/mod/groups/actions/join.php
@@ -43,7 +43,7 @@
remove_entity_relationship($user->guid, 'membership_request', $group->guid);
// add to river
- add_to_river('river/group/create','join',$user->guid,$group->guid);
+ add_to_river('river/relationship/member/create','join',$user->guid,$group->guid);
forward($group->getURL());
exit;
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 7ecd00f57..acd1c9f8b 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -181,17 +181,16 @@ or click below to view the group's join requests:
Forum river items
*/
- 'groups:river:member' => 'is now a member of',
- 'groups:river:created' => '%s created a new group called',
+ 'groups:river:member' => '%s is now a member of',
+ 'groups:river:create' => '%s created a new group called',
'groupforum:river:updated' => '%s has updated',
'groupforum:river:update' => 'this discussion topic',
'groupforum:river:created' => '%s has created',
'groupforum:river:create' => 'a new discussion topic titled',
- 'groupforum:river:posted' => '%s has posted a comment',
+ 'groupforum:river:posted' => '%s has posted a new comment',
'groupforum:river:annotate:create' => 'on this discussion topic',
'groupforumtopic:river:annotate' => 'a new comment on this discussion topic',
'groupforum:river:postedtopic' => '%s has started a new discussion topic titled',
- 'groups:river:member' => '%s is now a member of',
'groups:river:togroup' => 'to the group',
'groups:nowidgets' => 'No widgets have been defined for this group.',
diff --git a/mod/groups/views/default/river/group/create.php b/mod/groups/views/default/river/group/create.php
index 961750974..aa9fef47a 100644
--- a/mod/groups/views/default/river/group/create.php
+++ b/mod/groups/views/default/river/group/create.php
@@ -5,7 +5,7 @@
$objecturl = $object->getURL();
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = sprintf(elgg_echo("groups:river:created"),$url) . " ";
+ $string = sprintf(elgg_echo("groups:river:create"), $url) . " ";
$string .= " <a href=\"" . $object->getURL() . "\">" . $object->name . "</a>";
$string .= " <span class='entity_subtext'>". elgg_view_friendly_time($object->time_created);
if (isloggedin()) {
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