From: Jan Schneider Date: Tue, 4 May 2010 21:11:08 +0000 (+0200) Subject: Fix Identity instantiation. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a012432c6421ba18e0080d545148dd8ac5fa6856;p=horde.git Fix Identity instantiation. --- diff --git a/jonah/stories/share.php b/jonah/stories/share.php index 47924bc3a..f3ae42069 100644 --- a/jonah/stories/share.php +++ b/jonah/stories/share.php @@ -77,9 +77,7 @@ $form->addHidden('', 'channel_id', 'int', false); $form->addHidden('', 'story_id', 'int', false); $v = &$form->addVariable(_("From"), 'from', 'email', true, false); if (Horde_Auth::getAuth()) { - require_once 'Horde/Identity.php'; - $identity = Identity::factory(); - $v->setDefault($identity->getValue('from_addr')); + $v->setDefault($injector->getInstance('Horde_Prefs_Identity')->getOb()->getValue('from_addr')); } $form->addVariable(_("To"), 'recipients', 'email', true, false, _("Separate multiple email addresses with commas."), true); $form->addVariable(_("Subject"), 'subject', 'text', true); diff --git a/kronolith/feed/index.php b/kronolith/feed/index.php index d605c66a7..d4c17c249 100644 --- a/kronolith/feed/index.php +++ b/kronolith/feed/index.php @@ -86,7 +86,7 @@ if (isset($conf['urls']['pretty']) && $conf['urls']['pretty'] == 'rewrite') { } $owner = $share->get('owner'); -$identity = Horde_Prefs_Identity::factory('none', $owner); +$identity = $injectory->getInstance('Horde_Prefs_Identity')->getOb($owner); $history = $injector->getInstance('Horde_History'); $now = new Horde_Date(time()); diff --git a/wicked/lib/Page/StandardPage.php b/wicked/lib/Page/StandardPage.php index aa5185a65..94c489561 100644 --- a/wicked/lib/Page/StandardPage.php +++ b/wicked/lib/Page/StandardPage.php @@ -264,8 +264,10 @@ class StandardPage extends Page { { $requestor = $this->_lock['lock_owner']; if ($requestor) { - $identity = Horde_Prefs_Identity::factory('none', $requestor); - $name = $identity->getValue('fullname'); + $name = $GLOBALS['injector'] + ->getInstance('Horde_Prefs_Identity') + ->getOb($requestor) + ->getValue('fullname'); if (!strlen($name)) { $name = $requestor; }