From 84a96bec34b90beb720b6a4eb90423a187add87a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 4 May 2010 23:28:19 +0200 Subject: [PATCH] getOb() -> getIdentity() --- agora/messages/abuse.php | 2 +- agora/messages/index.php | 2 +- ansel/image.php | 2 +- ansel/lib/Ansel.php | 2 +- ansel/lib/Form/Ecard.php | 2 +- ansel/lib/Gallery.php | 2 +- ansel/lib/Image.php | 2 +- ansel/lib/Report.php | 2 +- ansel/lib/View/List.php | 2 +- ansel/rss.php | 2 +- fima/lib/Fima.php | 2 +- fima/lib/Forms/DeleteLedger.php | 2 +- folks/lib/Notification.php | 2 +- framework/Alarm/lib/Horde/Alarm.php | 2 +- framework/Core/lib/Horde/Core/Factory/Identity.php | 2 +- framework/Core/lib/Horde/Core/Prefs/Ui.php | 4 ++-- framework/Mime/lib/Horde/Mime/Mdn.php | 2 +- framework/Share/Share.php | 2 +- horde/admin/user.php | 4 ++-- horde/scripts/import_squirrelmail_prefs.php | 2 +- horde/services/confirm.php | 2 +- horde/services/portal/index.php | 2 +- horde/services/portal/mobile.php | 2 +- horde/services/problem.php | 2 +- imp/attachment.php | 2 +- imp/lib/Injector/Binder/Identity.php | 2 +- ingo/lib/Api.php | 2 +- ingo/lib/Application.php | 2 +- ingo/vacation.php | 2 +- jonah/stories/share.php | 2 +- kronolith/attendees.php | 2 +- kronolith/feed/index.php | 2 +- kronolith/lib/FreeBusy.php | 2 +- kronolith/lib/Kronolith.php | 14 +++++++------- kronolith/lib/View/EditEvent.php | 2 +- kronolith/scripts/agenda.php | 2 +- mnemo/lib/Mnemo.php | 4 ++-- nag/lib/Forms/task.php | 2 +- nag/lib/Nag.php | 14 +++++++------- nag/tasklists/info.php | 2 +- turba/lib/Driver/Group.php | 2 +- turba/lib/Turba.php | 4 ++-- whups/lib/Mail.php | 2 +- whups/lib/Ticket.php | 2 +- whups/lib/Whups.php | 2 +- wicked/lib/Page.php | 2 +- wicked/lib/Wicked.php | 2 +- 47 files changed, 63 insertions(+), 63 deletions(-) diff --git a/agora/messages/abuse.php b/agora/messages/abuse.php index 48eb007c2..1774bd8e1 100644 --- a/agora/messages/abuse.php +++ b/agora/messages/abuse.php @@ -57,7 +57,7 @@ if ($form->validate()) { /* Collect moderators emails, and send them the notify */ $emails = array(); foreach ($forum['moderators'] as $moderator) { - $identity = $injector->getInstance('Horde_Prefs_Identity')->getOb($moderator); + $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($moderator); $address = $identity->getValue('from_addr'); if (!empty($address)) { $emails[] = $address; diff --git a/agora/messages/index.php b/agora/messages/index.php index b193dd4c0..b3494e80b 100644 --- a/agora/messages/index.php +++ b/agora/messages/index.php @@ -77,7 +77,7 @@ $view = new Agora_View(); if (!$view_bodies) { /* Get the author's avatar. */ if ($conf['avatar']['allow_avatars']) { - $identity = $injector->getInstance('Horde_Prefs_Identity')->getOb($message['message_author']); + $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($message['message_author']); $avatar_path = $identity->getValue('avatar_path'); $message_author_avatar = Agora::validateAvatar($avatar_path) ? Agora::getAvatarUrl($avatar_path) : false; $view->message_author_avatar = $message_author_avatar; diff --git a/ansel/image.php b/ansel/image.php index 6d5ce8bd2..478fa1638 100644 --- a/ansel/image.php +++ b/ansel/image.php @@ -28,7 +28,7 @@ $date = Ansel::getDateParameter(); /* Are we watermarking the image? */ if ($watermark) { - $identity = $injector->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (empty($name)) { $name = Horde_Auth::getAuth(); diff --git a/ansel/lib/Ansel.php b/ansel/lib/Ansel.php index c2bd1d1f5..ed54650d4 100644 --- a/ansel/lib/Ansel.php +++ b/ansel/lib/Ansel.php @@ -704,7 +704,7 @@ class Ansel $owner, '', null, false); $fullname = $uprefs->getValue('grouptitle'); if (!$fullname) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($owner); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($owner); $fullname = $identity->getValue('fullname'); if (!$fullname) { $fullname = $owner; diff --git a/ansel/lib/Form/Ecard.php b/ansel/lib/Form/Ecard.php index 84f9d4fbe..bf7b17f0c 100644 --- a/ansel/lib/Form/Ecard.php +++ b/ansel/lib/Form/Ecard.php @@ -23,7 +23,7 @@ class Ansel_Form_Ecard extends Horde_Form { if (empty($user)) { $this->addVariable(_("Use the following return address:"), 'ecard_retaddr', 'text', true); } else { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $from_addr = $identity->getDefaultFromAddress(); $vars->set('ecard_retaddr', $from_addr); $this->addHidden('', 'ecard_retaddr', 'text', true); diff --git a/ansel/lib/Gallery.php b/ansel/lib/Gallery.php index 7d87899a2..8685adcd8 100644 --- a/ansel/lib/Gallery.php +++ b/ansel/lib/Gallery.php @@ -446,7 +446,7 @@ class Ansel_Gallery extends Horde_Share_Object_sql_hierarchical */ public function getOwner() { - return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($this->data['share_owner']); + return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($this->data['share_owner']); } /** diff --git a/ansel/lib/Image.php b/ansel/lib/Image.php index 915b8c60b..a15daceaa 100644 --- a/ansel/lib/Image.php +++ b/ansel/lib/Image.php @@ -1013,7 +1013,7 @@ class Ansel_Image Implements Iterator } if (empty($watermark)) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (empty($name)) { $name = Horde_Auth::getAuth(); diff --git a/ansel/lib/Report.php b/ansel/lib/Report.php index dd0cb4f75..e5b79e787 100644 --- a/ansel/lib/Report.php +++ b/ansel/lib/Report.php @@ -55,7 +55,7 @@ class Ansel_Report { */ function _getUserEmail($user = null) { - return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user)->getValue('from_addr'); + return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user)->getValue('from_addr'); } /** diff --git a/ansel/lib/View/List.php b/ansel/lib/View/List.php index d83c20905..06f881d32 100644 --- a/ansel/lib/View/List.php +++ b/ansel/lib/View/List.php @@ -158,7 +158,7 @@ class Ansel_View_List extends Ansel_View_Base 'ansel', $this->_owner, '', null, false); $fullname = $uprefs->getValue('grouptitle'); if (!$fullname) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($this->_owner); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($this->_owner); $fullname = $identity->getValue('fullname'); if (!$fullname) { $fullname = $this->_owner; diff --git a/ansel/rss.php b/ansel/rss.php index f72e0a05b..9f0bf2cc0 100644 --- a/ansel/rss.php +++ b/ansel/rss.php @@ -137,7 +137,7 @@ if (empty($rss)) { if (isset($galleries) && count($galleries)) { $images = $ansel_storage->getRecentImages($galleries); if (!is_a($images, 'PEAR_Error') && count($images)) { - $owner = $injector->getInstance('Horde_Prefs_Identity')->getOb($id); + $owner = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($id); $name = $owner->getValue('fullname'); $author = $owner->getValue('from_addr'); if (!$name) { diff --git a/fima/lib/Fima.php b/fima/lib/Fima.php index 97de38f65..3508a5b3e 100644 --- a/fima/lib/Fima.php +++ b/fima/lib/Fima.php @@ -716,7 +716,7 @@ class Fima { /* If the user's personal ledger doesn't exist, then create it. */ if (!$GLOBALS['fima_shares']->exists(Horde_Auth::getAuth())) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (trim($name) == '') { $name = Horde_Auth::getOriginalAuth(); diff --git a/fima/lib/Forms/DeleteLedger.php b/fima/lib/Forms/DeleteLedger.php index 359808cfb..3e453c6b5 100644 --- a/fima/lib/Forms/DeleteLedger.php +++ b/fima/lib/Forms/DeleteLedger.php @@ -67,7 +67,7 @@ class Fima_DeleteLedgerForm extends Horde_Form { if (count(Fima::listLedgers(true)) == 0) { // If the default share doesn't exist then create it. if (!$GLOBALS['fima_shares']->exists(Horde_Auth::getAuth())) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (trim($name) == '') { $name = Horde_Auth::getOriginalAuth(); diff --git a/folks/lib/Notification.php b/folks/lib/Notification.php index 14517cd81..acc7df528 100644 --- a/folks/lib/Notification.php +++ b/folks/lib/Notification.php @@ -221,7 +221,7 @@ class Folks_Notification { */ protected function _getUserFromAddr($user) { - return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user)->getValue('from_addr'); + return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user)->getValue('from_addr'); } /** diff --git a/framework/Alarm/lib/Horde/Alarm.php b/framework/Alarm/lib/Horde/Alarm.php index 8daaf854e..37b28dd83 100644 --- a/framework/Alarm/lib/Horde/Alarm.php +++ b/framework/Alarm/lib/Horde/Alarm.php @@ -457,7 +457,7 @@ class Horde_Alarm if (empty($alarm['user'])) { return; } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($alarm['user']); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($alarm['user']); $email = $identity->getDefaultFromAddress(true); } else { $email = $alarm['params']['mail']['email']; diff --git a/framework/Core/lib/Horde/Core/Factory/Identity.php b/framework/Core/lib/Horde/Core/Factory/Identity.php index 051521590..22e89115d 100644 --- a/framework/Core/lib/Horde/Core/Factory/Identity.php +++ b/framework/Core/lib/Horde/Core/Factory/Identity.php @@ -61,7 +61,7 @@ class Horde_Core_Factory_Identity * @return Horde_Identity The singleton identity instance. * @throws Horde_Exception */ - public function getOb($user = null, $driver = null) + public function getIdentity($user = null, $driver = null) { $class = empty($driver) ? 'Horde_Prefs_Identity' diff --git a/framework/Core/lib/Horde/Core/Prefs/Ui.php b/framework/Core/lib/Horde/Core/Prefs/Ui.php index a6ef7c63b..4276d5edf 100644 --- a/framework/Core/lib/Horde/Core/Prefs/Ui.php +++ b/framework/Core/lib/Horde/Core/Prefs/Ui.php @@ -720,7 +720,7 @@ class Horde_Core_Prefs_Ui */ protected function _identityHeader($members) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(null, $this->app); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(null, $this->app); $default_identity = $identity->getDefault(); $t = $GLOBALS['injector']->createInstance('Horde_Template'); @@ -792,7 +792,7 @@ class Horde_Core_Prefs_Ui { global $conf, $notification, $prefs; - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(null, $this->app); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(null, $this->app); if ($this->vars->delete_identity) { $id = intval($this->vars->id); diff --git a/framework/Mime/lib/Horde/Mime/Mdn.php b/framework/Mime/lib/Horde/Mime/Mdn.php index 6ca3c2982..a643c43da 100644 --- a/framework/Mime/lib/Horde/Mime/Mdn.php +++ b/framework/Mime/lib/Horde/Mime/Mdn.php @@ -141,7 +141,7 @@ class Horde_Mime_Mdn $mod = array(), $err = array()) { /* Set up some variables we use later. */ - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $from_addr = $identity->getDefaultFromAddress(); $to = $this->getMdnReturnAddr(); diff --git a/framework/Share/Share.php b/framework/Share/Share.php index ca0544d4b..d30cb903c 100644 --- a/framework/Share/Share.php +++ b/framework/Share/Share.php @@ -505,7 +505,7 @@ class Horde_Share { } } - return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($share->get('owner')); + return $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($share->get('owner')); } /** diff --git a/horde/admin/user.php b/horde/admin/user.php index a2979361c..9387fc72e 100644 --- a/horde/admin/user.php +++ b/horde/admin/user.php @@ -170,7 +170,7 @@ case 'update': $notification->push(sprintf(_("There was a problem updating \"%s\": %s"), $user_name_1, $result->getMessage()), 'horde.error'); } else { - $identity = $injector->getInstance('Horde_Prefs_Identity')->getOb($user_name_1); + $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($user_name_1); $identity->setValue('fullname', $fullname); $identity->setValue('from_addr', $email); $identity->save(); @@ -216,7 +216,7 @@ require HORDE_TEMPLATES . '/common-header.inc'; require HORDE_TEMPLATES . '/admin/menu.inc'; if (isset($update_form) && $auth->hasCapability('list')) { - $identity = $injector->getInstance('Horde_Prefs_Identity')->getOb($f_user_name); + $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($f_user_name); require HORDE_TEMPLATES . '/admin/user/update.inc'; } elseif (isset($remove_form) && $auth->hasCapability('list') && diff --git a/horde/scripts/import_squirrelmail_prefs.php b/horde/scripts/import_squirrelmail_prefs.php index 3caf0359b..54ad658eb 100644 --- a/horde/scripts/import_squirrelmail_prefs.php +++ b/horde/scripts/import_squirrelmail_prefs.php @@ -26,7 +26,7 @@ function savePrefs($user, $basename, $prefs_cache) // Import identities if (isset($prefs_cache['identities']) && $prefs_cache['identities'] > 1) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user, 'imp'); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user, 'imp'); // Intentionally off-by-one for ($i = 1; $i < $prefs_cache['identities']; $i++) { $new_identity = array('id' => 'Identity #' . ($i + 1), diff --git a/horde/services/confirm.php b/horde/services/confirm.php index 3684b1f88..d96136dd2 100644 --- a/horde/services/confirm.php +++ b/horde/services/confirm.php @@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../lib/Application.php'; Horde_Registry::appInit('horde', array('nologintasks' => true)); -$identity = $injector->getInstance('Horde_Prefs_Identity')->getOb(); +$identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity(); list($message, $type) = $identity->confirmIdentity(Horde_Util::getFormData('h')); $notification->push($message, $type); diff --git a/horde/services/portal/index.php b/horde/services/portal/index.php index 2560216fc..1d52252b6 100644 --- a/horde/services/portal/index.php +++ b/horde/services/portal/index.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../../lib/Application.php'; Horde_Registry::appInit('horde'); // Get full name. -$identity = $injector->getInstance('Horde_Prefs_Identity')->getOb(); +$identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity(); $fullname = $identity->getValue('fullname'); if (empty($fullname)) { $fullname = Horde_Auth::convertUsername(Horde_Auth::getAuth(), false); diff --git a/horde/services/portal/mobile.php b/horde/services/portal/mobile.php index 1e44fac66..38ad12620 100644 --- a/horde/services/portal/mobile.php +++ b/horde/services/portal/mobile.php @@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/../../lib/Application.php'; Horde_Registry::appInit('horde'); -$identity = $injector->getInstance('Horde_Prefs_Identity')->getOb(); +$identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity(); $fullname = $identity->getValue('fullname'); if (empty($fullname)) { $fullname = Horde_Auth::getAuth(); diff --git a/horde/services/problem.php b/horde/services/problem.php index 2559d2983..85f7984dd 100644 --- a/horde/services/problem.php +++ b/horde/services/problem.php @@ -23,7 +23,7 @@ if (!Horde_Menu::showService('problem')) { _returnToPage(); } -$identity = $injector->getInstance('Horde_Prefs_Identity')->getOb(); +$identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity(); $email = $identity->getValue('from_addr'); if (!$email) { $email = Horde_Util::getFormData('email', Horde_Auth::getAuth()); diff --git a/imp/attachment.php b/imp/attachment.php index 2f48d18b9..43c8d0f01 100644 --- a/imp/attachment.php +++ b/imp/attachment.php @@ -74,7 +74,7 @@ if ($conf['compose']['link_attachments_notify']) { $prefs = Horde_Prefs::singleton($conf['prefs']['driver'], 'horde', $mail_user); $prefs->retrieve(); - $mail_identity = $injector->getInstance('Horde_Prefs_Identity')->getOb($mail_user); + $mail_identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($mail_user); $mail_address = $mail_identity->getDefaultFromAddress(); /* Ignore missing addresses, which are returned as <>. */ diff --git a/imp/lib/Injector/Binder/Identity.php b/imp/lib/Injector/Binder/Identity.php index 30ae14e6c..299af4d72 100644 --- a/imp/lib/Injector/Binder/Identity.php +++ b/imp/lib/Injector/Binder/Identity.php @@ -16,7 +16,7 @@ class IMP_Injector_Binder_Identity implements Horde_Injector_Binder */ public function create(Horde_Injector $injector) { - return $injector->getInstance('Horde_Prefs_Identity')->getOb(null, 'imp'); + return $injector->getInstance('Horde_Prefs_Identity')->getIdentity(null, 'imp'); } /** diff --git a/ingo/lib/Api.php b/ingo/lib/Api.php index e7278d1fd..3a1c99bc8 100644 --- a/ingo/lib/Api.php +++ b/ingo/lib/Api.php @@ -127,7 +127,7 @@ class Ingo_Api extends Horde_Registry_Api /* Make sure we have at least one address. */ if (empty($info['addresses'])) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); /* Remove empty lines. */ $info['addresses'] = preg_replace('/\n{2,}/', "\n", implode("\n", $identity->getAll('from_addr'))); if (empty($addresses)) { diff --git a/ingo/lib/Application.php b/ingo/lib/Application.php index 7a6638b6f..01d640c66 100644 --- a/ingo/lib/Application.php +++ b/ingo/lib/Application.php @@ -70,7 +70,7 @@ class Ingo_Application extends Horde_Registry_Application /* If personal share doesn't exist then create it. */ $signature = $_SESSION['ingo']['backend']['id'] . ':' . Horde_Auth::getAuth(); if (!$GLOBALS['ingo_shares']->exists($signature)) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (trim($name) == '') { $name = Horde_Auth::getOriginalAuth(); diff --git a/ingo/vacation.php b/ingo/vacation.php index ed114058e..613c373b7 100644 --- a/ingo/vacation.php +++ b/ingo/vacation.php @@ -105,7 +105,7 @@ $form->appendButtons(_("Return to Rules List")); /* Make sure we have at least one address. */ if (!$vacation->getVacationAddresses()) { - $identity = $injector->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity(); $addresses = implode("\n", $identity->getAll('from_addr')); /* Remove empty lines. */ $addresses = preg_replace('/\n+/', "\n", $addresses); diff --git a/jonah/stories/share.php b/jonah/stories/share.php index f3ae42069..e8330bee0 100644 --- a/jonah/stories/share.php +++ b/jonah/stories/share.php @@ -77,7 +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()) { - $v->setDefault($injector->getInstance('Horde_Prefs_Identity')->getOb()->getValue('from_addr')); + $v->setDefault($injector->getInstance('Horde_Prefs_Identity')->getIdentity()->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/attendees.php b/kronolith/attendees.php index 0bd8240cd..56322d157 100644 --- a/kronolith/attendees.php +++ b/kronolith/attendees.php @@ -179,7 +179,7 @@ $view = Horde_Util::getFormData('view', 'Day'); // Pre-format our delete image/link. $delimg = Horde::img('delete.png', _("Remove Attendee")); -$ident = $injector->getInstance('Horde_Prefs_Identity')->getOb(); +$ident = $injector->getInstance('Horde_Prefs_Identity')->getIdentity(); $identities = $ident->getAll('id'); $vars = Horde_Variables::getDefaultVariables(); $tabs = new Horde_Ui_Tabs(null, $vars); diff --git a/kronolith/feed/index.php b/kronolith/feed/index.php index d4c17c249..dc9fa0f52 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 = $injectory->getInstance('Horde_Prefs_Identity')->getOb($owner); +$identity = $injectory->getInstance('Horde_Prefs_Identity')->getIdentity($owner); $history = $injector->getInstance('Horde_History'); $now = new Horde_Date(time()); diff --git a/kronolith/lib/FreeBusy.php b/kronolith/lib/FreeBusy.php index 5806d4ed5..073c4afd9 100644 --- a/kronolith/lib/FreeBusy.php +++ b/kronolith/lib/FreeBusy.php @@ -60,7 +60,7 @@ class Kronolith_FreeBusy } /* Get the Identity for the owner of the share. */ - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user ? $user : $owner); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user ? $user : $owner); $email = $identity->getValue('from_addr'); $cn = $identity->getValue('fullname'); if (empty($mail) && empty($cn)) { diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 11bcf2c63..3fec49496 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -1140,7 +1140,7 @@ class Kronolith if (Horde_Auth::getAuth() && !count($GLOBALS['display_calendars']) && !$GLOBALS['kronolith_shares']->exists(Horde_Auth::getAuth())) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (trim($name) == '') { $name = Horde_Auth::getOriginalAuth(); @@ -1197,7 +1197,7 @@ class Kronolith static $names = array(); if (!isset($names[$uid])) { - $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($uid); + $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($uid); $ident->setDefault($ident->getDefault()); $names[$uid] = $ident->getValue('fullname'); if (empty($names[$uid])) { @@ -1216,7 +1216,7 @@ class Kronolith static $emails = array(); if (!isset($emails[$uid])) { - $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($uid); + $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($uid); $emails[$uid] = $ident->getValue('from_addr'); if (empty($emails[$uid])) { $emails[$uid] = $uid; @@ -1234,7 +1234,7 @@ class Kronolith static $emails = array(); if (!isset($emails[$uid])) { - $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($uid); + $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($uid); $addrs = $ident->getAll('from_addr'); $addrs[] = $uid; @@ -2017,7 +2017,7 @@ class Kronolith return; } - $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($event->creator); + $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($event->creator); $myemail = $ident->getValue('from_addr'); if (!$myemail) { @@ -2172,7 +2172,7 @@ class Kronolith throw new Kronolith_Exception($share); } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $from = $identity->getDefaultFromAddress(true); $owner = $share->get('owner'); @@ -2208,7 +2208,7 @@ class Kronolith if (!$vals) { continue; } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user); $email = $identity->getValue('from_addr'); if (strpos($email, '@') === false) { continue; diff --git a/kronolith/lib/View/EditEvent.php b/kronolith/lib/View/EditEvent.php index f50a58716..5f51b8a04 100644 --- a/kronolith/lib/View/EditEvent.php +++ b/kronolith/lib/View/EditEvent.php @@ -45,7 +45,7 @@ class Kronolith_View_EditEvent { exit; } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); if ($this->event->hasPermission(Horde_Perms::EDIT)) { $calendar_id = $this->event->calendar; diff --git a/kronolith/scripts/agenda.php b/kronolith/scripts/agenda.php index 5fb3c1259..82d03690a 100755 --- a/kronolith/scripts/agenda.php +++ b/kronolith/scripts/agenda.php @@ -72,7 +72,7 @@ function send_agendas() } // try to find an email address for the user - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user); $email = $identity->getValue('from_addr'); if (strstr($email, '@')) { list($mailbox, $host) = explode('@', $email); diff --git a/mnemo/lib/Mnemo.php b/mnemo/lib/Mnemo.php index 68f7a921f..d81d82b9e 100644 --- a/mnemo/lib/Mnemo.php +++ b/mnemo/lib/Mnemo.php @@ -216,7 +216,7 @@ class Mnemo { static $names = array(); if (!isset($names[$uid])) { - $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($uid); + $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($uid); $ident->setDefault($ident->getDefault()); $names[$uid] = $ident->getValue('fullname'); if (empty($names[$uid])) { @@ -443,7 +443,7 @@ class Mnemo { /* If the user's personal notepad doesn't exist, then create it. */ if (!$GLOBALS['mnemo_shares']->exists(Horde_Auth::getAuth())) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (trim($name) == '') { $name = Horde_Auth::removeHook(Horde_Auth::getAuth()); diff --git a/nag/lib/Forms/task.php b/nag/lib/Forms/task.php index 878d3b224..7d473aa7b 100644 --- a/nag/lib/Forms/task.php +++ b/nag/lib/Forms/task.php @@ -65,7 +65,7 @@ class Nag_TaskForm extends Horde_Form { } if (count($users)) { foreach (array_keys($users) as $user) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user); $fullname = $identity->getValue('fullname'); $users[$user] = strlen($fullname) ? $fullname : $user; } diff --git a/nag/lib/Nag.php b/nag/lib/Nag.php index 96e1fa614..f13491dac 100644 --- a/nag/lib/Nag.php +++ b/nag/lib/Nag.php @@ -647,7 +647,7 @@ class Nag return ''; } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($assignee); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($assignee); $fullname = $identity->getValue('fullname'); if (!strlen($fullname)) { $fullname = $assignee; @@ -720,7 +720,7 @@ class Nag /* If the user's personal tasklist doesn't exist, then create it. */ if (!$GLOBALS['nag_shares']->exists(Horde_Auth::getAuth())) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (trim($name) == '') { $name = Horde_Auth::getOriginalAuth(); @@ -838,7 +838,7 @@ class Nag $groups = Group::singleton(); $recipients = array(); - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $from = $identity->getDefaultFromAddress(true); $owner = $share->get('owner'); @@ -873,7 +873,7 @@ class Nag if (!$vals) { continue; } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user); $email = $identity->getValue('from_addr'); if (strpos($email, '@') === false) { continue; @@ -953,12 +953,12 @@ class Nag $old_task->category, $task->category); } if ($old_task->assignee != $task->assignee) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($old_task->assignee); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($old_task->assignee); $old_name = $identity->getValue('fullname'); if (!strlen($old_name)) { $old_name = $old_task->assignee; } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($task->assignee); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($task->assignee); $new_name = $identity->getValue('fullname'); if (!strlen($new_name)) { $new_name = $new_task->assignee; @@ -1050,7 +1050,7 @@ class Nag static $names = array(); if (!isset($names[$uid])) { - $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($uid); + $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($uid); $ident->setDefault($ident->getDefault()); $names[$uid] = $ident->getValue('fullname'); if (empty($names[$uid])) { diff --git a/nag/tasklists/info.php b/nag/tasklists/info.php index 4fba0d99d..df04acd0f 100644 --- a/nag/tasklists/info.php +++ b/nag/tasklists/info.php @@ -23,7 +23,7 @@ $subscribe_url = Horde::url($registry->get('webroot', 'horde') . '/rpc.php/nag/' . ($tasklist->get('owner') ? $tasklist->get('owner') : '') . '/' . $tasklist->getName() . '.ics'; -$identity = $injector->getInstance('Horde_Prefs_Identity')->getOb($tasklist->get('owner')); +$identity = $injector->getInstance('Horde_Prefs_Identity')->getIdentity($tasklist->get('owner')); $owner_name = $identity->getValue('fullname'); if (trim($owner_name) == '') { $owner_name = Horde_Auth::getOriginalAuth(); diff --git a/turba/lib/Driver/Group.php b/turba/lib/Driver/Group.php index 60466043e..1941eb1b1 100644 --- a/turba/lib/Driver/Group.php +++ b/turba/lib/Driver/Group.php @@ -135,7 +135,7 @@ class Turba_Driver_Group extends Turba_Driver $members = $groups->listAllUsers($this->_gid); $addressbook = array(); foreach ($members as $member) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($member); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($member); $name = $identity->getValue('fullname'); $email = $identity->getValue('from_addr'); // We use the email as the key since we could have multiple users diff --git a/turba/lib/Turba.php b/turba/lib/Turba.php index 0fadf9789..c8f4cf972 100644 --- a/turba/lib/Turba.php +++ b/turba/lib/Turba.php @@ -278,7 +278,7 @@ class Turba { static $names = array(); if (!isset($names[$uid])) { - $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($uid); + $ident = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($uid); $ident->setDefault($ident->getDefault()); $names[$uid] = $ident->getValue('fullname'); if (empty($names[$uid])) { @@ -536,7 +536,7 @@ class Turba { { if (!isset($params['name'])) { /* Sensible default for empty display names */ - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (trim($name) == '') { $name = Horde_Auth::getOriginalAuth(); diff --git a/whups/lib/Mail.php b/whups/lib/Mail.php index 1f96b7793..661070a8e 100644 --- a/whups/lib/Mail.php +++ b/whups/lib/Mail.php @@ -214,7 +214,7 @@ class Whups_Mail { if ($auth->hasCapability('list')) { foreach ($auth->listUsers() as $user) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user); $addrs = $identity->getAll('from_addr'); foreach ($addrs as $addr) { if (strcasecmp($from, $addr) == 0) { diff --git a/whups/lib/Ticket.php b/whups/lib/Ticket.php index d3e2cd36d..0cdf29509 100644 --- a/whups/lib/Ticket.php +++ b/whups/lib/Ticket.php @@ -726,7 +726,7 @@ class Whups_Ticket { } /* Build message template. */ - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $name = $identity->getValue('fullname'); if (empty($name)) { $name = Horde_Auth::getBareAuth(); diff --git a/whups/lib/Whups.php b/whups/lib/Whups.php index bfd809eee..3ca93559f 100644 --- a/whups/lib/Whups.php +++ b/whups/lib/Whups.php @@ -571,7 +571,7 @@ class Whups { } } catch (Horde_Mime_Exception $e) {} } else { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($user); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($user); $results[$user]['name'] = $identity->getValue('fullname'); $results[$user]['email'] = $identity->getValue('from_addr'); diff --git a/wicked/lib/Page.php b/wicked/lib/Page.php index afa4c4216..51f083612 100644 --- a/wicked/lib/Page.php +++ b/wicked/lib/Page.php @@ -257,7 +257,7 @@ class Page { return _("Guest"); } - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb($modify); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity($modify); $name = $identity->getValue('fullname'); if (!empty($name)) { $modify = $name; diff --git a/wicked/lib/Wicked.php b/wicked/lib/Wicked.php index 33473fead..8c0b86506 100644 --- a/wicked/lib/Wicked.php +++ b/wicked/lib/Wicked.php @@ -160,7 +160,7 @@ class Wicked { $conf['wicked']['guest_address'] : $conf['wicked']['notify_address']; if (Horde_Auth::getAuth()) { - $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getOb(); + $identity = $GLOBALS['injector']->getInstance('Horde_Prefs_Identity')->getIdentity(); $from = $identity->getValue('fullname'); if (empty($from)) { $from = $registry->get('name'); -- 2.11.0