Fix Identity instantiation.
authorJan Schneider <jan@horde.org>
Tue, 4 May 2010 21:11:08 +0000 (23:11 +0200)
committerJan Schneider <jan@horde.org>
Tue, 4 May 2010 21:11:25 +0000 (23:11 +0200)
jonah/stories/share.php
kronolith/feed/index.php
wicked/lib/Page/StandardPage.php

index 47924bc..f3ae420 100644 (file)
@@ -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);
index d605c66..d4c17c2 100644 (file)
@@ -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());
 
index aa5185a..94c4895 100644 (file)
@@ -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;
             }