/[drupal]/contributions/modules/node_import/import_cck.inc
ViewVC logotype

Diff of /contributions/modules/node_import/import_cck.inc

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

revision 1.6, Tue Apr 25 10:25:25 2006 UTC revision 1.7, Sat Apr 29 11:40:15 2006 UTC
# Line 36  function content_node_import_prepare(&$n Line 36  function content_node_import_prepare(&$n
36        $referenced_nodes = array();        $referenced_nodes = array();
37        $sql = "select nid, title from {node} where title sounds like '%s'";        $sql = "select nid, title from {node} where title sounds like '%s'";
38        $result = db_query($sql, $node->$field['field_name']);        $result = db_query($sql, $node->$field['field_name']);
39        $record_found = db_fetch_object($result);        $record_found = db_fetch_object($result);
   
40        if ($record_found) {        if ($record_found) {
41          if ($field['multiple']) {          $node_field = array(0 => array('nid' => $record_found->nid));
           $node_field = array(0 => array('nid' => $record_found->nid));  
         } else {  
           $node_field = array('nid' => $record_found->nid);  
         }  
42        } else {        } else {
43          $node_field = array();          $node_field = array();
44        }        }
45        $node->$field['field_name'] = $node_field;        $node->$field['field_name'] = $node_field;
   
46      } else {//default node types: add value to array w/ key 'value'      } else {//default node types: add value to array w/ key 'value'
47        $thisval = $node->$field['field_name'];        $thisval = $node->$field['field_name'];
48        if ($field['widget']['type'] == 'weburl') {        if ($field['widget']['type'] == 'weburl') {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2