From bf13fd58b4ed4b8325671edf44f63ec015470cd1 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 2 Jun 2010 12:14:45 +0200 Subject: [PATCH] Simplify From: generation. --- kronolith/lib/Kronolith.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 5244754f8..ed3daec0d 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -2120,15 +2120,11 @@ class Kronolith } $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($event->creator); - - $myemail = $ident->getValue('from_addr'); - if (!$myemail) { + if (!$ident->getValue('from_addr')) { $notification->push(sprintf(_("You do not have an email address configured in your Personal Information Options. You must set one %shere%s before event notifications can be sent."), Horde::getServiceLink('options', 'kronolith')->add(array('app' => 'horde', 'group' => 'identities'))->link(), ''), 'horde.error', array('content.raw')); return; } - - $myemail = explode('@', $myemail); - $from = Horde_Mime_Address::writeAddress($myemail[0], isset($myemail[1]) ? $myemail[1] : '', $ident->getValue('fullname')); + $from = $ident->getDefaultFromAddress(true); $share = $GLOBALS['kronolith_shares']->getShare($event->calendar); -- 2.11.0