You are here

function module_load_include in Schema 5

Load a module include file. Copied from D6.

Parameters

$type: The include file's type (file extension).

$module: The module to which the include file belongs.

$name: Optionally, specify the file name. If not set, the module's name is used.

1 call to module_load_include()
module_load_all_includes in ./schema_util.inc
Load an include file for each of the modules that have been enabled in the system table. Copied from D6.

File

./schema_util.inc, line 111

Code

function module_load_include($type, $module, $name = NULL) {
  if (empty($name)) {
    $name = $module;
  }
  $file = './' . drupal_get_path('module', $module) . "/{$name}.{$type}";
  if (is_file($file)) {
    require_once $file;
  }
  else {
    return FALSE;
  }
}