source: sipes/modules_contrib/diff/includes/node.inc @ 177a560

stableversion-3.0
Last change on this file since 177a560 was 177a560, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agrego el directorio de modulos contribuidos de drupal

  • Propiedad mode establecida a 100644
File size: 721 octetos
Línea 
1<?php
2
3/**
4 * @file
5 * Implementation of hook_diff() for node.module (body and title).
6 */
7
8/**
9 * Implementation of hook_diff() for node.module (body and title).
10 */
11function node_diff($old_node, $new_node) {
12
13  $result = array();
14  $type = node_get_types('type', $new_node);
15  $result['title'] = array(
16    '#name' => $type->title_label,
17    '#old' => array($old_node->title),
18    '#new' => array($new_node->title),
19    '#weight' => -5,
20    '#format' => array(
21      'show_header' => FALSE,
22    )
23  );
24  if ($type->has_body) {
25    $result['body'] = array(
26      '#name' => $type->body_label,
27      '#old' => explode("\n", $old_node->body),
28      '#new' => explode("\n", $new_node->body),
29    );
30  }
31  return $result;
32}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.