Projet

Général

Profil

Révision b4adf10d

Ajouté par Assos Assos il y a plus de 9 ans

Udpate to 7.33

Voir les différences:

drupal7/modules/node/node.module
210 210
        'custom settings' => FALSE,
211 211
      ),
212 212
      'search_result' => array(
213
        'label' => t('Search result'),
213
        'label' => t('Search result highlighting input'),
214 214
        'custom settings' => FALSE,
215 215
      ),
216 216
    );
......
1397 1397
  $node->content = array();
1398 1398

  
1399 1399
  // Allow modules to change the view mode.
1400
  $context = array(
1401
    'entity_type' => 'node',
1402
    'entity' => $node,
1403
    'langcode' => $langcode,
1404
  );
1405
  drupal_alter('entity_view_mode', $view_mode, $context);
1400
  $view_mode = key(entity_view_mode_prepare('node', array($node->nid => $node), $view_mode, $langcode));
1406 1401

  
1407 1402
  // The 'view' hook can be implemented to overwrite the default function
1408 1403
  // to display nodes.
......
2604 2599

  
2605 2600
    $node->link = url("node/$node->nid", array('absolute' => TRUE));
2606 2601
    $node->rss_namespaces = array();
2602
    $account = user_load($node->uid);
2607 2603
    $node->rss_elements = array(
2608 2604
      array('key' => 'pubDate', 'value' => gmdate('r', $node->created)),
2609
      array('key' => 'dc:creator', 'value' => $node->name),
2605
      array('key' => 'dc:creator', 'value' => format_username($account)),
2610 2606
      array('key' => 'guid', 'value' => $node->nid . ' at ' . $base_url, 'attributes' => array('isPermaLink' => 'false'))
2611 2607
    );
2612 2608

  
......
2664 2660
 *   An array in the format expected by drupal_render().
2665 2661
 */
2666 2662
function node_view_multiple($nodes, $view_mode = 'teaser', $weight = 0, $langcode = NULL) {
2667
  field_attach_prepare_view('node', $nodes, $view_mode, $langcode);
2668
  entity_prepare_view('node', $nodes, $langcode);
2669 2663
  $build = array();
2664
  $entities_by_view_mode = entity_view_mode_prepare('node', $nodes, $view_mode, $langcode);
2665
  foreach ($entities_by_view_mode as $entity_view_mode => $entities) {
2666
    field_attach_prepare_view('node', $entities, $entity_view_mode, $langcode);
2667
    entity_prepare_view('node', $entities, $langcode);
2668

  
2669
    foreach ($entities as $entity) {
2670
      $build['nodes'][$entity->nid] = node_view($entity, $entity_view_mode, $langcode);
2671
    }
2672
  }
2673

  
2670 2674
  foreach ($nodes as $node) {
2671
    $build['nodes'][$node->nid] = node_view($node, $view_mode, $langcode);
2672 2675
    $build['nodes'][$node->nid]['#weight'] = $weight;
2673 2676
    $weight++;
2674 2677
  }
2678
  // Sort here, to preserve the input order of the entities that were passed to
2679
  // this function.
2680
  uasort($build['nodes'], 'element_sort');
2675 2681
  $build['nodes']['#sorted'] = TRUE;
2682

  
2676 2683
  return $build;
2677 2684
}
2678 2685

  
......
3629 3636
      // Try to allocate enough time to rebuild node grants
3630 3637
      drupal_set_time_limit(240);
3631 3638

  
3632
      $nids = db_query("SELECT nid FROM {node}")->fetchCol();
3639
      // Rebuild newest nodes first so that recent content becomes available quickly.
3640
      $nids = db_query("SELECT nid FROM {node} ORDER BY nid DESC")->fetchCol();
3633 3641
      foreach ($nids as $nid) {
3634 3642
        $node = node_load($nid, NULL, TRUE);
3635 3643
        // To preserve database integrity, only acquire grants if the node

Formats disponibles : Unified diff