/[drupal]/drupal/modules/node.module
ViewVC logotype

Diff of /drupal/modules/node.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.641.2.22, Tue Dec 5 13:07:44 2006 UTC revision 1.641.2.23, Tue Dec 5 13:16:52 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: node.module,v 1.641.2.21 2006/11/23 21:47:01 killes Exp $  // $Id: node.module,v 1.641.2.22 2006/12/05 13:07:44 killes Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 345  function node_load($param = array(), $re Line 345  function node_load($param = array(), $re
345      $nodes = array();      $nodes = array();
346    }    }
347    
348      $cachable = FALSE;
349    $arguments = array();    $arguments = array();
350    if (is_numeric($param)) {    if (is_numeric($param)) {
351      $cachable = $revision == NULL;      $cachable = $revision == NULL;
352      if ($cachable && isset($nodes[$param])) {      if ($cachable && isset($nodes[$param])) {
353        return drupal_clone($nodes[$param]);        return is_object($nodes[$param]) ? drupal_clone($nodes[$param]) : $nodes[$param];
354      }      }
355      $cond = 'n.nid = %d';      $cond = 'n.nid = %d';
356      $arguments[] = $param;      $arguments[] = $param;
# Line 390  function node_load($param = array(), $re Line 391  function node_load($param = array(), $re
391    }    }
392    
393    if ($cachable) {    if ($cachable) {
394      $nodes[$param] = drupal_clone($node);      $nodes[$param] = is_object($node) ? drupal_clone($node) : $node;
395    }    }
396    
397    return $node;    return $node;

Legend:
Removed from v.1.641.2.22  
changed lines
  Added in v.1.641.2.23

  ViewVC Help
Powered by ViewVC 1.1.2