Commit ef1235cc authored by Gábor Hojtsy's avatar Gábor Hojtsy

#207863 by mikey_p, Pancho: use module_load_include() as intended

parent cdbcbac8
......@@ -215,7 +215,7 @@ function forum_admin_settings() {
* Returns an overview list of existing forums and containers
*/
function forum_overview(&$form_state) {
include_once(drupal_get_path('module', 'taxonomy') .'/taxonomy.admin.inc');
module_load_include('inc', 'taxonomy', 'taxonomy.admin');
$vid = variable_get('forum_nav_vocabulary', '');
$vocabulary = taxonomy_vocabulary_load($vid);
......
......@@ -151,7 +151,7 @@ function openid_login_validate($form, &$form_state) {
* @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);
......@@ -213,7 +213,7 @@ function openid_begin($claimed_id, $return_to = '', $form_values = array()) {
* $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';
......@@ -247,8 +247,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();
......@@ -318,7 +318,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());
......@@ -369,7 +369,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'];
......@@ -423,7 +423,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,
......@@ -441,7 +441,7 @@ function openid_association_request($public) {
}
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));
......@@ -480,7 +480,7 @@ function openid_authentication_request($claimed_id, $identity, $return_to = '',
* @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;
......
......@@ -24,7 +24,7 @@ function update_manual_status() {
*/
function _update_refresh() {
global $base_url;
include_once './modules/update/update.compare.inc';
module_load_include('inc', 'update', 'update.compare');
// Since we're fetching new available update data, we want to clear
// everything in our cache, to ensure we recompute the status. Note that
......
......@@ -191,7 +191,7 @@ function update_theme() {
function update_requirements($phase) {
if ($phase == 'runtime') {
if ($available = update_get_available(FALSE)) {
include_once './modules/update/update.compare.inc';
module_load_include('inc', 'update', 'update.compare');
$data = update_calculate_project_data($available);
// First, populate the requirements for core:
$requirements['update_core'] = _update_requirement_check($data['drupal'], 'core');
......@@ -337,7 +337,7 @@ function _update_no_data() {
* @see update_get_projects()
*/
function update_get_available($refresh = FALSE) {
include_once './modules/update/update.compare.inc';
module_load_include('inc', 'update', 'update.compare');
$available = array();
// First, make sure that none of the .info files have a change time
......@@ -386,7 +386,7 @@ function update_invalidate_cache() {
* Wrapper to load the include file and then refresh the release data.
*/
function update_refresh() {
include_once './modules/update/update.fetch.inc';
module_load_include('inc', 'update', 'update.fetch');
return _update_refresh();
}
......
......@@ -11,7 +11,7 @@
*/
function update_status() {
if ($available = update_get_available(TRUE)) {
include_once './modules/update/update.compare.inc';
module_load_include('inc', 'update', 'update.compare');
$data = update_calculate_project_data($available);
return theme('update_report', $data);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment