? services/.DS_Store
Index: services.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/services/services.module,v
retrieving revision 1.16
diff -r1.16 services.module
156,161c156
< 
<   $items['crossdomain.xml'] = array(
<     'access callback'   => 'services_access_menu',
<     'page callback'     => 'services_crossdomain_xml',
<     'type'              => MENU_CALLBACK,
<   );
---
>   
259,274d253
< /**
<  * Callback for crossdomain.xml
<  */
< function services_crossdomain_xml() {
<   $output = '<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">' . "\n";
<   $output .= '<cross-domain-policy>' . "\n";
< 
<   $domains = module_invoke_all('services_crossdomain_domain_policy');
<   drupal_alter('services_crossdomain_domain_policy', $domains);
< 
<   foreach ($domains as $domain => $info) {
<     $output .= '  <allow-access-from domain="' . check_plain($domain) . '" />' . "\n";
<     if ($info['subdomain_wildcard']) {
<       $output .= '  <allow-access-from domain="*.' . check_plain($domain) . '" />' . "\n";
<     }
<   }
276,310d254
<   $output .= '</cross-domain-policy>';
< 
<   services_xml_output($output);
< }
< 
< /**
<  * Implementation of hook_services_crossdomain_domain_policy().
<  */
< function services_services_crossdomain_domain_policy() {
<   // Allow our own domain and it's subdomains
<   return array(
<     $_SERVER['HTTP_HOST'] => array(
<       'subdomain_wildcard' => TRUE,
<     ),
<   );
< }
< 
< /**
<  * Helper function for services_crossdomain_xml().
<  * Outputs the necessary http headers and xml processing instruction then exits.
<  *
<  * @param string $xml
<  *  The xml document to print.
<  * @return void
<  *  This function never returns, it always exits.
<  */
< function services_xml_output($xml) {
<   $xml = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . $xml;
<   header('Connection: close');
<   header('Content-Length: ' . strlen($xml));
<   header('Content-Type: text/xml');
<   header('Date: ' . date('r'));
<   echo $xml;
<   exit;
< }
Index: tests/unit/TestServicesModule.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/services/tests/unit/TestServicesModule.test,v
retrieving revision 1.4
diff -r1.4 TestServicesModule.test
143,144c143,144
<     $message = t('There should be 14 menu items') ;
<     $this->assertEqual(count($items), 14, $message) ;
---
>     $message = t('There should be 13 menu items') ;
>     $this->assertEqual(count($items), 13, $message) ;
178,198d177
< 
<     // cross domain tested separately as it does not share so many settings.
<     $menuItem = 'crossdomain.xml' ;
< 
<     $message = t('crossdomain.xml should have an array of 3 values') ;
<     $this->assertEqual(count($items['crossdomain.xml']), 3, $message) ;
< 
<     $message = t('crossdomain.xml should have \'access callback\' '
<       . '=> \'services_access_menu\'') ;
<     $this->assertEqual($items['crossdomain.xml']['access callback'],
<       'services_access_menu', $message) ;
< 
<     $message = t('crossdomain.xml should have \'page callback\' '
<       . '=> \'services_crossdomain_xml\'') ;
<     $this->assertEqual($items['crossdomain.xml']['page callback'],
<       'services_crossdomain_xml', $message) ;
< 
<    $message = t('crossdomain.xml should have \'page callback\' '
<       . '=> \'services_crossdomain_xml\'') ;
<     $this->assertEqual($items['crossdomain.xml']['page callback'],
<       'services_crossdomain_xml', $message) ;
