? .openid_provider.pages.inc.swp
? 621956-13_openid_provider_form.patch
? PATCHES.txt
? openid_provider-slow_association.patch
Index: openid_provider.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider/openid_provider.inc,v
retrieving revision 1.3.2.7
diff -u -r1.3.2.7 openid_provider.inc
--- openid_provider.inc	15 Feb 2010 21:13:15 -0000	1.3.2.7
+++ openid_provider.inc	22 Jul 2010 13:59:14 -0000
@@ -95,11 +95,11 @@
 
   // Check for a directed identity request.
   if ($request['openid.identity'] == 'http://specs.openid.net/auth/2.0/identifier_select') {
-    $identity = url(openid_provider_user_url($user->uid), array('absolute' => TRUE));
+    $identity = openid_provider_url(openid_provider_user_path($user->uid));
   }
   else {
     $identity = $request['openid.identity'];
-    if ($identity != url(openid_provider_user_url($user->uid), array('absolute' => TRUE))) {
+    if ($identity != openid_provider_url(openid_provider_user_path($user->uid))) {
       $response = openid_provider_authentication_error($request['openid.mode']);
       openid_redirect($request['openid.return_to'], $response);
     }
@@ -108,7 +108,7 @@
   $response = array(
     'openid.ns' => OPENID_NS_2_0,
     'openid.mode' => 'id_res',
-    'openid.op_endpoint' => url('openid/provider', array('absolute' => TRUE)),
+    'openid.op_endpoint' => openid_provider_url('openid/provider'),
     'openid.identity' => $identity,
     'openid.claimed_id' => $identity,
     'openid.return_to' => $request['openid.return_to'],
Index: openid_provider.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_provider/openid_provider.module,v
retrieving revision 1.3.2.4
diff -u -r1.3.2.4 openid_provider.module
--- openid_provider.module	15 Feb 2010 21:13:15 -0000	1.3.2.4
+++ openid_provider.module	22 Jul 2010 13:59:15 -0000
@@ -39,7 +39,7 @@
     'type' => MENU_CALLBACK,
     'file' => 'openid_provider.pages.inc'
   );
-  $items[openid_provider_user_url('%user')] = array(
+  $items[openid_provider_user_path('%user')] = array(
     'title' => 'OpenID Page',
     'page callback' => 'openid_provider_page',
     'page arguments' => array(1),
@@ -86,8 +86,8 @@
  */
 function openid_provider_init() {
   // Not all OpenID clients may be smart enough to do XRDS.
-  drupal_add_link(array('rel' => 'openid2.provider', 'href' => url('openid/provider', array('absolute' => TRUE))));
-  drupal_add_link(array('rel' => 'openid.server', 'href' => url('openid/provider', array('absolute' => TRUE))));
+  drupal_add_link(array('rel' => 'openid2.provider', 'href' => openid_provider_url('openid/provider')));
+  drupal_add_link(array('rel' => 'openid.server', 'href' => openid_provider_url('openid/provider')));
 
 }
 
@@ -114,7 +114,7 @@
         $pathauto_user = (object) array_merge((array) $account, $edit);
         if ($account->name) {
           $placeholders = pathauto_get_placeholders('user', $pathauto_user);
-          $src = openid_provider_user_url($account->uid);
+          $src = openid_provider_user_path($account->uid);
           $alias = pathauto_create_alias('openid_provider', $op, $placeholders, $src, $account->uid);
         }
       }
@@ -123,7 +123,7 @@
       // If the user is deleted, remove the path aliases
       if (module_exists('pathauto')) {
         $account = (object) $account;
-       	path_set_alias(openid_provider_user_url($account->uid));
+       	path_set_alias(openid_provider_user_path($account->uid));
       }
       break;
     case 'view':
@@ -135,7 +135,7 @@
         $account->content['openid']['identity'] = array(
           '#type' => 'user_profile_item',
           '#title' => t('Identity'),
-          '#value' => t('You may login to other OpenID enabled sites using %url', array('%url' => url(openid_provider_user_url($account->uid), array('absolute' => TRUE)))),
+          '#value' => t('You may login to other OpenID enabled sites using %url', array('%url' => openid_provider_url(openid_provider_user_path($account->uid)))),
           '#class' => 'openid',
         );
       }
@@ -144,9 +144,24 @@
 }
 
 /**
- * Return the canonical OpenID URL for this user id
+ * Return the absolute url to the path, without any language modifications.
  */
-function openid_provider_user_url($uid) {
+function openid_provider_url($path) {
+  // Prevent any language modifications to the url by generating and using a
+  // fake language object.
+  $language = new stdClass();
+  $language->language = '';
+  $language->prefix = '';
+  return url($path, array(
+    'absolute' => TRUE,
+    'language' => $language,
+  ));
+}
+
+/**
+ * Return the local OpenID URL for this user id
+ */
+function openid_provider_user_path($uid) {
   if (is_object($uid)) {
     $uid = $uid->uid;
   }
@@ -184,10 +199,10 @@
 
   $data = array(
     'Type' => $types,
-    'URI' => array(url('openid/provider', array('absolute' => TRUE))),
+    'URI' => array(openid_provider_url('openid/provider')),
   );
   if ($account->uid) {
-    $data['LocalID'] = array(url(openid_provider_user_url($account->uid), array('absolute' => TRUE)));
+    $data['LocalID'] = array(openid_provider_url(openid_provider_user_path($account->uid)));
   }
   
   $xrds['openid_provider'] = array(
@@ -322,7 +337,7 @@
   $placeholders = array();
   while ($user = db_fetch_object($result)) {
     $placeholders = pathauto_get_placeholders('user', $user);
-    $src = openid_provider_user_url($user->uid);
+    $src = openid_provider_user_path($user->uid);
     if ($alias = pathauto_create_alias('openid_provider', 'bulkupdate', $placeholders, $src, $user->uid)) {
       $count++;
     }
