From: Jan Schneider Date: Wed, 2 Jun 2010 10:14:45 +0000 (+0200) Subject: Simplify From: generation. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bf13fd58b4ed4b8325671edf44f63ec015470cd1;p=horde.git Simplify From: generation. --- 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);