aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/notification.php38
1 files changed, 19 insertions, 19 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index 1356e455c..87f5b962a 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -227,7 +227,7 @@
// From
$site = get_entity($CONFIG->site_guid);
if ((isset($from->email)) && (!($from instanceof ElggUser))) // If there's an email address, use it - but only if its not from a user.
- $from = $from->from;
+ $from = $from->email;
else if (($site) && (isset($site->email))) // Has the current site got a from email address?
$from = $site->email;
else if (isset($from->url)) // If we have a url then try and use that.
@@ -237,22 +237,22 @@
}
else // If all else fails, use the domain of the site.
$from = 'noreply@' . get_site_domain($CONFIG->site_guid);
-
+
if (is_callable('mb_internal_encoding')) {
- mb_internal_encoding('UTF-8');
+ mb_internal_encoding('UTF-8');
}
- $site = get_entity($CONFIG->site_guid);
- $sitename = $site->name;
+ $site = get_entity($CONFIG->site_guid);
+ $sitename = $site->name;
if (is_callable('mb_encode_mimeheader')) {
- $sitename = mb_encode_mimeheader($site->name,"UTF-8", "B");
+ $sitename = mb_encode_mimeheader($site->name,"UTF-8", "B");
}
$headers = "From: \"$sitename\" <$from>\r\n"
. "Content-Type: text/plain; charset=UTF-8; format=flowed\r\n"
. "MIME-Version: 1.0\r\n"
- . "Content-Transfer-Encoding: 8bit\r\n";
-
+ . "Content-Transfer-Encoding: 8bit\r\n";
+
if (is_callable('mb_encode_mimeheader')) {
- $subject = mb_encode_mimeheader($subject,"UTF-8", "B");
+ $subject = mb_encode_mimeheader($subject,"UTF-8", "B");
}
// Strip tags from message
@@ -272,9 +272,9 @@
// Add settings view to user settings & register action
extend_elgg_settings_page('notifications/settings/usersettings', 'usersettings/user');
-
- register_plugin_hook('usersettings:save','user','notification_user_settings_save');
-
+
+ register_plugin_hook('usersettings:save','user','notification_user_settings_save');
+
//register_action("notifications/settings/usersettings/save");
@@ -289,13 +289,13 @@
'value' => array ('type' => 'bool')
), elgg_echo('user.notification.set'));
- }
-
- function notification_user_settings_save() {
-
- global $CONFIG;
- @include($CONFIG->path . "actions/notifications/settings/usersettings/save.php");
-
+ }
+
+ function notification_user_settings_save() {
+
+ global $CONFIG;
+ @include($CONFIG->path . "actions/notifications/settings/usersettings/save.php");
+
}
// Register a startup event