From f87a44b08f5ec9c4113d213bf6c80ccb52e3094f Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 31 Oct 2008 10:51:31 +0000 Subject: Closes #488: This is indeed a typo... well spotted :) git-svn-id: https://code.elgg.org/elgg/trunk@2370 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/notification.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'engine/lib') 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 -- cgit v1.2.3