aboutsummaryrefslogtreecommitdiff
path: root/mod/invitefriends/actions
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:33:52 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-03 03:33:52 +0000
commit949a233076ec18f86e60f90a7a8837cb422664af (patch)
tree0286c9cb2c3301a164505e39dccf02a4e0a98497 /mod/invitefriends/actions
parentd4e4268d11612408e4989a5c57f69fcb2febe8aa (diff)
downloadelgg-949a233076ec18f86e60f90a7a8837cb422664af.tar.gz
elgg-949a233076ec18f86e60f90a7a8837cb422664af.tar.bz2
Refs #2428 almost done removing CONFIG access - mostly plugin start.php left
git-svn-id: http://code.elgg.org/elgg/trunk@7999 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/invitefriends/actions')
-rw-r--r--mod/invitefriends/actions/invite.php10
1 files changed, 6 insertions, 4 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);