From ad16a84d4e7f05984310110947a51116d458e354 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 10 Sep 2010 23:19:22 -0600 Subject: [PATCH] Need to provide these stub methods here. Doesn't really belong here, though, but the Itip package is sort of broken in that it requires these methods to exist. --- framework/Core/lib/Horde/Core/Prefs/Identity.php | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/framework/Core/lib/Horde/Core/Prefs/Identity.php b/framework/Core/lib/Horde/Core/Prefs/Identity.php index 92a0d77a0..25aa7f7ca 100644 --- a/framework/Core/lib/Horde/Core/Prefs/Identity.php +++ b/framework/Core/lib/Horde/Core/Prefs/Identity.php @@ -112,4 +112,35 @@ class Horde_Core_Prefs_Identity extends Horde_Prefs_Identity $notification->push(sprintf(_("The email address %s has been added to your identities. You can close this window now."), $verified[$this->_prefnames['from_addr']]), 'horde.success'); } + /** + * Returns the from address based on the chosen identity. If no + * address can be found it is built from the current user name and + * the specified maildomain. + * + * @param integer $ident The identity to retrieve the address from. + * + * @return string A valid from address. + */ + public function getFromAddress($ident = null) + { + return $GLOBALS['prefs']->getValue('from_addr'); + } + + /** + * Returns the identity's id that matches the passed addresses. + * + * @param mixed $addresses Either an array or a single string or a + * comma-separated list of email addresses. + * @param boolean $search_own Search for a matching identity in own + * addresses also? + * + * @return integer The id of the first identity that from or alias + * addresses match (one of) the passed addresses or + * null if none matches. + */ + public function getMatchingIdentity($addresses, $search_own = true) + { + return null; + } + } -- 2.11.0