Skip to content

Commit

Permalink
Merge pull request #10551 from Elgg/2.2
Browse files Browse the repository at this point in the history
2.2 to 2.x
  • Loading branch information
jdalsem committed Nov 2, 2016
2 parents b725bab + 51d0af2 commit 3aa490b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mod/groups/actions/groups/membership/join.php
Expand Up @@ -43,6 +43,8 @@
} else {
register_error(elgg_echo("groups:cantjoin"));
}
} elseif (check_entity_relationship($user->guid, 'membership_request', $group->guid)) {
register_error(elgg_echo("groups:joinrequest:exists"));
} else {
add_entity_relationship($user->guid, 'membership_request', $group->guid);

Expand Down
1 change: 1 addition & 0 deletions mod/groups/languages/en.php
Expand Up @@ -132,6 +132,7 @@
'groups:addedtogroup' => 'Successfully added the user to the group',
'groups:joinrequestnotmade' => 'Could not request to join group',
'groups:joinrequestmade' => 'Requested to join group',
'groups:joinrequest:exists' => 'You already requested membership for this group',
'groups:joined' => 'Successfully joined group!',
'groups:left' => 'Successfully left group',
'groups:notowner' => 'Sorry, you are not the owner of this group.',
Expand Down
13 changes: 12 additions & 1 deletion mod/likes/actions/likes/add.php
Expand Up @@ -46,11 +46,21 @@

$title_str = $entity->getDisplayName();
if (!$title_str) {
$title_str = elgg_get_excerpt($entity->description);
$title_str = elgg_get_excerpt($entity->description, 80);
}

$site = elgg_get_site_entity();

// summary for site_notifications
$summary = elgg_echo('likes:notifications:subject', array(
$user->name,
$title_str
),
$owner->language
);

// prevent long subjects in mail
$title_str = elgg_get_excerpt($title_str, 80);
$subject = elgg_echo('likes:notifications:subject', array(
$user->name,
$title_str
Expand All @@ -77,6 +87,7 @@
array(
'action' => 'create',
'object' => $annotation,
'summary' => $summary,
)
);
}
Expand Down

0 comments on commit 3aa490b

Please sign in to comment.