From: Michael J. Rubinsky Date: Mon, 8 Jun 2009 13:41:55 +0000 (-0400) Subject: Use the new contacts/ownContact API method for this X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d9b69481b1675636c56276f0d35a6a6e1ba11eff;p=horde.git Use the new contacts/ownContact API method for this --- diff --git a/timeobjects/lib/Driver/Weatherdotcom.php b/timeobjects/lib/Driver/Weatherdotcom.php index 02ec0c78c..e13213be4 100644 --- a/timeobjects/lib/Driver/Weatherdotcom.php +++ b/timeobjects/lib/Driver/Weatherdotcom.php @@ -21,9 +21,9 @@ class TimeObjects_Driver_Weatherdotcom extends TimeObjects_Driver { if (empty($params['location'])) { // Try to get a good location string from Turba's "own" contact - $own = $GLOBALS['registry']->horde->getPreference('turba', 'own_contact'); - @list($source, $id) = explode(';', $own); - $contact = $GLOBALS['registry']->contacts->getContact($source, $id); + $contact = $GLOBALS['registry']->contacts->ownVCard(); + var_dump($contact); + die; $params['location'] = !empty($contact['homeCity']) ? $contact['homeCity'] . (!empty($contact['homeProvince']) ? ', ' . $contact['homeProvince'] : '')