diff options
Diffstat (limited to 'mod/invitefriends')
-rw-r--r-- | mod/invitefriends/actions/invite.php | 10 | ||||
-rw-r--r-- | mod/invitefriends/views/default/invitefriends/formitems.php | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/mod/invitefriends/actions/invite.php b/mod/invitefriends/actions/invite.php index a1a6241f0..75311071c 100644 --- a/mod/invitefriends/actions/invite.php +++ b/mod/invitefriends/actions/invite.php @@ -6,6 +6,8 @@ * @package ElggInviteFriends */ +$site = elgg_get_site_entity(); + $emails = get_input('emails'); $emailmessage = get_input('emailmessage'); @@ -47,21 +49,21 @@ foreach ($emails as $email) { $link = elgg_get_site_url() . 'pg/register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username); $message = elgg_echo('invitefriends:email', array( - $CONFIG->site->name, + $site->name, $current_user->name, $emailmessage, $link ) ); - $subject = elgg_echo('invitefriends:subject', array($CONFIG->site->name)); + $subject = elgg_echo('invitefriends:subject', array($site->name)); // create the from address - $site = get_entity($CONFIG->site_guid); + $site = get_entity($site->guid); if (($site) && (isset($site->email))) { $from = $site->email; } else { - $from = 'noreply@' . get_site_domain($CONFIG->site_guid); + $from = 'noreply@' . get_site_domain($site->guid); } elgg_send_email($from, $email, $subject, $message); diff --git a/mod/invitefriends/views/default/invitefriends/formitems.php b/mod/invitefriends/views/default/invitefriends/formitems.php index c7af78981..555311dd0 100644 --- a/mod/invitefriends/views/default/invitefriends/formitems.php +++ b/mod/invitefriends/views/default/invitefriends/formitems.php @@ -6,10 +6,11 @@ * @package ElggInviteFriends */ -if ($CONFIG->allow_registration) { +if (elgg_get_config('allow_registration')) { + $site = elgg_get_site_entity(); $introduction = elgg_echo('invitefriends:introduction'); $message = elgg_echo('invitefriends:message'); - $default = elgg_echo('invitefriends:message:default', array($CONFIG->site->name)); + $default = elgg_echo('invitefriends:message:default', array($site->name)); echo <<< HTML <p class="margin-top"> |