Projet

Général

Profil

Révision 30d5b9c5

Ajouté par Mathieu Schiano Di Schiabica il y a environ 8 ans

Update to 7.42

Voir les différences:

drupal7/includes/module.inc
320 320
 *   The name of the included file, if successful; FALSE otherwise.
321 321
 */
322 322
function module_load_include($type, $module, $name = NULL) {
323
  static $files = array();
324

  
323 325
  if (!isset($name)) {
324 326
    $name = $module;
325 327
  }
326 328

  
329
  $key = $type . ':' . $module . ':' . $name;
330
  if (isset($files[$key])) {
331
    return $files[$key];
332
  }
333

  
327 334
  if (function_exists('drupal_get_path')) {
328 335
    $file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$name.$type";
329 336
    if (is_file($file)) {
330 337
      require_once $file;
338
      $files[$key] = $file;
331 339
      return $file;
332 340
    }
341
    else {
342
      $files[$key] = FALSE;
343
    }
333 344
  }
334 345
  return FALSE;
335 346
}
......
365 376
 * - Invoke hook_modules_installed().
366 377
 * - Invoke hook_modules_enabled().
367 378
 *
368
 * @param $module_list
379
 * @param string[] $module_list
369 380
 *   An array of module names.
370
 * @param $enable_dependencies
381
 * @param bool $enable_dependencies
371 382
 *   If TRUE, dependencies will automatically be added and enabled in the
372 383
 *   correct order. This incurs a significant performance cost, so use FALSE
373 384
 *   if you know $module_list is already complete and in the correct order.
374 385
 *
375
 * @return
386
 * @return bool
376 387
 *   FALSE if one or more dependencies are missing, TRUE otherwise.
377 388
 *
378 389
 * @see hook_install()
379 390
 * @see hook_enable()
380 391
 * @see hook_modules_installed()
381 392
 * @see hook_modules_enabled()
393
 * @see module_disable()
394
 * @see drupal_uninstall_modules()
382 395
 */
383 396
function module_enable($module_list, $enable_dependencies = TRUE) {
384 397
  if ($enable_dependencies) {
......
505 518
/**
506 519
 * Disables a given set of modules.
507 520
 *
508
 * @param $module_list
521
 * @param string[] $module_list
509 522
 *   An array of module names.
510
 * @param $disable_dependents
523
 * @param bool $disable_dependents
511 524
 *   If TRUE, dependent modules will automatically be added and disabled in the
512 525
 *   correct order. This incurs a significant performance cost, so use FALSE
513 526
 *   if you know $module_list is already complete and in the correct order.
527
 *
528
 * @see drupal_uninstall_modules()
529
 * @see module_enable()
514 530
 */
515 531
function module_disable($module_list, $disable_dependents = TRUE) {
516 532
  if ($disable_dependents) {
......
722 738
    drupal_static_reset('module_hook_info');
723 739
    drupal_static_reset('drupal_alter');
724 740
    cache_clear_all('hook_info', 'cache_bootstrap');
741
    cache_clear_all('system_cache_tables', 'cache');
725 742
    return;
726 743
  }
727 744

  

Formats disponibles : Unified diff