Use the new contacts/ownContact API method for this
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 8 Jun 2009 13:41:55 +0000 (09:41 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 8 Jun 2009 13:41:55 +0000 (09:41 -0400)
timeobjects/lib/Driver/Weatherdotcom.php

index 02ec0c7..e13213b 100644 (file)
@@ -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'] : '')