[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/diff/includes/ -> node.inc (source)

   1  <?php
   2  // $Id: node.inc,v 1.1.2.2 2010/08/12 16:34:08 yhahn Exp $
   3  
   4  /**
   5   * @file
   6   * Implementation of hook_diff() for node.module (body and title).
   7   */
   8  
   9  /**
  10   * Implementation of hook_diff() for node.module (body and title).
  11   */
  12  function node_diff($old_node, $new_node) {
  13  
  14    $result = array();
  15    $type = node_get_types('type', $new_node);
  16    $result['title'] = array(
  17      '#name' => $type->title_label,
  18      '#old' => array($old_node->title),
  19      '#new' => array($new_node->title),
  20      '#weight' => -5,
  21      '#format' => array(
  22        'show_header' => FALSE,
  23      )
  24    );
  25    if ($type->has_body) {
  26      $result['body'] = array(
  27        '#name' => $type->body_label,
  28        '#old' => explode("\n", $old_node->body),
  29        '#new' => explode("\n", $new_node->body),
  30      );
  31    }
  32    return $result;
  33  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7