Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.15
diff -u -p -r1.15 openid.module
--- modules/openid/openid.module	20 Dec 2007 08:57:54 -0000	1.15
+++ modules/openid/openid.module	9 Jan 2008 02:39:18 -0000
@@ -137,7 +137,7 @@ function openid_login_validate($form, &$
  * @param $return_to The endpoint to return to from the OpenID Provider
  */
 function openid_begin($claimed_id, $return_to = '', $form_values = array()) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
+  module_load_include('inc', 'openid');
 
   $claimed_id = _openid_normalize($claimed_id);
 
@@ -199,7 +199,7 @@ function openid_begin($claimed_id, $retu
  *   $response['status'] set to one of 'success', 'failed' or 'cancel'.
  */
 function openid_complete($response) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
+  module_load_include('inc', 'openid');
 
   // Default to failed response
   $response['status'] = 'failed';
@@ -233,8 +233,8 @@ function openid_complete($response) {
  * URI, etc).
  */
 function openid_discovery($claimed_id) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
-  include_once drupal_get_path('module', 'openid') .'/xrds.inc';
+  module_load_include('inc', 'openid');
+  module_load_include('inc', 'openid', 'xrds');
 
   $services = array();
 
@@ -304,7 +304,7 @@ function openid_discovery($claimed_id) {
  * @return $assoc_handle The association handle.
  */
 function openid_association($op_endpoint) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
+  module_load_include('inc', 'openid');
 
   // Remove Old Associations:
   db_query("DELETE FROM {openid_association} WHERE created + expires_in < %d", time());
@@ -355,7 +355,7 @@ function openid_association($op_endpoint
  * @param $response Response values from the OpenID Provider.
  */
 function openid_authentication($response) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
+  module_load_include('inc', 'openid');
 
   $identity = $response['openid.identity'];
 
@@ -404,7 +404,7 @@ function openid_authentication($response
 }
 
 function openid_association_request($public) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
+  module_load_include('inc', 'openid');
 
   $request = array(
     'openid.ns' => OPENID_NS_2_0,
@@ -422,7 +422,7 @@ function openid_association_request($pub
 }
 
 function openid_authentication_request($claimed_id, $identity, $return_to = '', $assoc_handle = '', $version = 2) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
+  module_load_include('inc', 'openid');
 
   $realm = ($return_to) ? $return_to : url('', array('absolute' => TRUE));
 
@@ -461,7 +461,7 @@ function openid_authentication_request($
  * @return boolean
  */
 function openid_verify_assertion($op_endpoint, $response) {
-  include_once drupal_get_path('module', 'openid') .'/openid.inc';
+  module_load_include('inc', 'openid');
 
   $valid = FALSE;
 
