[Tickets #11637] ActiveSync AutoDiscover : Extend Driver.php to store the request and response schema in the properties

bugs at horde.org bugs at horde.org
Sun Nov 4 16:24:49 UTC 2012


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: http://bugs.horde.org/ticket/11637
------------------------------------------------------------------------------
  Ticket           | 11637
  Erstellt Von     | torben at dannhauer.info
  Zusammenfassung  | ActiveSync AutoDiscover : Extend Driver.php to store the
                   | request and response schema in the properties
  Warteschlange    | Horde Framework Packages
  Version          | Git master
  Typ              | Enhancement
  Status           | New
  Priorität        | 2. Medium
  Milestone        |
  Patch            | 1
  Zuständige       |
------------------------------------------------------------------------------


torben at dannhauer.info (2012-11-04 16:24) hat geschrieben:

To allow better reaction to different clients performing the  
autodiscover, it is neccessary to store the request-schema and  
response schema in the properties array.

It will be used in a second ActiveSycnc Enhancement I will post as  
tickets in some minutes.

Therefore please extend "/Horde/Core/ActiveSync/Driver.php :: autoDiscover()"
with the following lines:
         xml_parse_into_struct(xml_parser_create(),  
Horde_Rpc::getInput(), $values);
         $results['request_schema'] = $values[0]['attributes']['XMLNS'];
         $results['response_schema'] = $values[3]['value'];

The full function should look like this:
     /**
      * Attempt to autodiscover. Autodiscovery happens before the user is
      * authenticated, and ALWAYS uses the user's email address. We have to
      * do our best to translate email address to username. If this fails, the
      * device simply falls back to requiring full user configuration.
      *
      * @return array
      */
     public function autoDiscover()
     {
         $results = array();

         // Attempt to get a username from the email address.
         $ident = $GLOBALS['injector']
             ->getInstance('Horde_Core_Factory_Identity')
             ->create($GLOBALS['registry']->getAuth());
         $results['display_name'] = $ident->getValue('fullname');
         $results['email'] = $ident->getValue('from_addr');
         $url = parse_url((string)Horde::url(null, true));
         $results['url'] = $url['scheme'] . '://' . $url['host'] .  
'/Microsoft-Server-ActiveSync';
         xml_parse_into_struct(xml_parser_create(),  
Horde_Rpc::getInput(), $values);
         $results['request_schema'] = $values[0]['attributes']['XMLNS'];
         $results['response_schema'] = $values[3]['value'];

         // As of Exchange 2007, this always returns en:en
         $results['culture'] = 'en:en';
         return $results;
     }







More information about the bugs mailing list