Projet

Général

Profil

Révision 5587145e

Ajouté par Assos Assos il y a presque 7 ans

Update to 7.56

Voir les différences:

drupal7/modules/block/block.module
432 432
  drupal_alter('block_info', $current_blocks, $theme, $code_blocks);
433 433
  foreach ($current_blocks as $module => $module_blocks) {
434 434
    foreach ($module_blocks as $delta => $block) {
435
      if (!isset($block['pages'])) {
436
        // {block}.pages is type 'text', so it cannot have a
437
        // default value, and not null, so we need to provide
438
        // value if the module did not.
439
        $block['pages']  = '';
440
      }
441
      // Make sure weight is set.
442
      if (!isset($block['weight'])) {
443
        $block['weight'] = 0;
444
      }
435
      // Make sure certain attributes are set.
436
      $block += array(
437
        'pages' => '',
438
        'weight' => 0,
439
        'status' => 0,
440
      );
441
      // Check for active blocks in regions that are not available.
445 442
      if (!empty($block['region']) && $block['region'] != BLOCK_REGION_NONE && !isset($regions[$block['region']]) && $block['status'] == 1) {
446 443
        drupal_set_message(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => $block['info'], '%region' => $block['region'])), 'warning');
447 444
        // Disabled modules are moved into the BLOCK_REGION_NONE later so no
448 445
        // need to move the block to another region.
449 446
        $block['status'] = 0;
450 447
      }
451
      // Set region to none if not enabled and make sure status is set.
448
      // Set region to none if not enabled.
452 449
      if (empty($block['status'])) {
453 450
        $block['status'] = 0;
454 451
        $block['region'] = BLOCK_REGION_NONE;

Formats disponibles : Unified diff