/[drupal]/contributions/modules/node_factory/node_factory.module
ViewVC logotype

Diff of /contributions/modules/node_factory/node_factory.module

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

revision 1.1.2.19, Thu Aug 28 10:08:50 2008 UTC revision 1.1.2.20, Thu Aug 28 13:40:10 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: node_factory.module,v 1.1.2.18 2008/08/28 08:59:30 clemenstolboom Exp $  // $Id: node_factory.module,v 1.1.2.19 2008/08/28 10:08:50 clemenstolboom Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 284  function _node_factory_iterate( $type, $ Line 284  function _node_factory_iterate( $type, $
284      switch ($type) {      switch ($type) {
285          case 'json':          case 'json':
286            $node = json_decode($item, TRUE);            $node = json_decode($item, TRUE);
287              var_dump($item);
288            break;            break;
289        case 'php':        case 'php':
290          _node_factory_create_php( $item);          _node_factory_create_php( $item);
# Line 313  function _node_factory_create_and_save( Line 314  function _node_factory_create_and_save(
314      if( DRUSH_VERBOSE) {      if( DRUSH_VERBOSE) {
315        drush_verbose( t('Node !n of type !t created', array( '!n' => $nid, '!t' => $type)));        drush_verbose( t('Node !n of type !t created', array( '!n' => $nid, '!t' => $type)));
316        $node = node_load( array( 'nid'=>$nid));        $node = node_load( array( 'nid'=>$nid));
       var_export( $node);  
317      }      }
318    }    }
319    else {    else {
# Line 321  function _node_factory_create_and_save( Line 321  function _node_factory_create_and_save(
321    }    }
322  }  }
323    
324    
325  function _node_factory_create_node_xml() {  function _node_factory_create_node_xml() {
326    // xml://path_to_file    // xml://path_to_file
327    drush_die( t('Not yet implemented'));    drush_die( t('Not yet implemented'));
328    return;    return;
329  }  }
330    
331    
332  function _node_factory_create_node_php() {  function _node_factory_create_node_php() {
333    // php://path_to_file/file_name    // php://path_to_file/file_name
334    drush_die( t('Not yet implemented'));    drush_die( t('Not yet implemented'));
335    return;    return;
336  }  }
337    
338    
339  function _node_factory_create_node_json() {  function _node_factory_create_node_json() {
340    $nodes = func_get_args();    $nodes = func_get_args();
341    drush_verbose( t('Received @d', array( '@d' => count($nodes))));    drush_verbose( t('Received @d', array( '@d' => count($nodes))));
342    _node_factory_iterate( 'json', $nodes);    _node_factory_iterate( 'json', $nodes);
   
343  }  }

Legend:
Removed from v.1.1.2.19  
changed lines
  Added in v.1.1.2.20

  ViewVC Help
Powered by ViewVC 1.1.2