aboutsummaryrefslogtreecommitdiff
path: root/mod/invitefriends
diff options
context:
space:
mode:
Diffstat (limited to 'mod/invitefriends')
-rw-r--r--mod/invitefriends/actions/invite.php13
-rw-r--r--mod/invitefriends/views/default/invitefriends/formitems.php2
2 files changed, 8 insertions, 7 deletions
diff --git a/mod/invitefriends/actions/invite.php b/mod/invitefriends/actions/invite.php
index bb6b71385..a1a6241f0 100644
--- a/mod/invitefriends/actions/invite.php
+++ b/mod/invitefriends/actions/invite.php
@@ -46,14 +46,15 @@ foreach ($emails as $email) {
}
$link = elgg_get_site_url() . 'pg/register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username);
- $message = sprintf(elgg_echo('invitefriends:email'),
+ $message = elgg_echo('invitefriends:email', array(
$CONFIG->site->name,
$current_user->name,
$emailmessage,
$link
+ )
);
- $subject = sprintf(elgg_echo('invitefriends:subject'), $CONFIG->site->name);
+ $subject = elgg_echo('invitefriends:subject', array($CONFIG->site->name));
// create the from address
$site = get_entity($CONFIG->site_guid);
@@ -68,16 +69,16 @@ foreach ($emails as $email) {
}
if ($error) {
- register_error(sprintf(elgg_echo('invitefriends:invitations_sent'), $sent_total));
+ register_error(elgg_echo('invitefriends:invitations_sent', array($sent_total)));
if (count($bad_emails) > 0) {
- register_error(sprintf(elgg_echo('invitefriends:email_error'), implode(', ', $bad_emails)));
+ register_error(elgg_echo('invitefriends:email_error', array(implode(', ', $bad_emails))));
}
if (count($already_members) > 0) {
- register_error(sprintf(elgg_echo('invitefriends:already_members'), implode(', ', $already_members)));
+ register_error(elgg_echo('invitefriends:already_members', array(implode(', ', $already_members))));
}
-
+
} else {
system_message(elgg_echo('invitefriends:success'));
}
diff --git a/mod/invitefriends/views/default/invitefriends/formitems.php b/mod/invitefriends/views/default/invitefriends/formitems.php
index 68296460a..8bf397d54 100644
--- a/mod/invitefriends/views/default/invitefriends/formitems.php
+++ b/mod/invitefriends/views/default/invitefriends/formitems.php
@@ -10,7 +10,7 @@ if ($CONFIG->allow_registration) {
$invite = elgg_echo('friends:invite');
$introduction = elgg_echo('invitefriends:introduction');
$message = elgg_echo('invitefriends:message');
- $default = sprintf(elgg_echo('invitefriends:message:default'), $CONFIG->site->name);
+ $default = elgg_echo('invitefriends:message:default', array($CONFIG->site->name));
echo <<< HTML
<h2>$invite</h2>