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

Diff of /contributions/modules/bookimport/bookimport.module

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

revision 1.3, Fri Jan 27 06:45:17 2006 UTC revision 1.4, Sat Jan 28 07:26:18 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: $  // $Id: bookimport.module,v 1.3 2006/01/27 06:45:17 puregin Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 186  function bookimport_page_xml() { Line 186  function bookimport_page_xml() {
186    
187    }    }
188    $form['#method'] = 'post';    $form['#method'] = 'post';
189    $form['#action'] = 'import/book';    $form['#action'] = url('import/book');
190    $form['#attributes'] = array("enctype" => "multipart/form-data");    $form['#attributes'] = array("enctype" => "multipart/form-data");
191    $output = drupal_get_form('bookimport_page_xml', $form);    $output = drupal_get_form('bookimport_page_xml', $form);
192    
# Line 206  function bookimport_page_xml() { Line 206  function bookimport_page_xml() {
206   */   */
207  function bookimport_importxml() {  function bookimport_importxml() {
208    define('DEBUG', 0);    define('DEBUG', 0);
209    
210      $edit = $_POST['edit'];
211      $op = _bookimport_form_radio2text();
212    
213    if (DEBUG > 0) {    if (DEBUG > 0) {
214      print "<pre>";      print "<pre>";
215      print "Op = $op<br />";      print "Op = $op<br />";
216    }    }
217    
   $edit = $_POST['edit'];  
   $op = _bookimport_form_radio2text();  
   
   
   
218    $fileh = file_check_upload('xml_upload');    $fileh = file_check_upload('xml_upload');
219    $xmlfile = $fileh->filepath;    $xmlfile = $fileh->filepath;
   
   // global hash provides mapping from old nid to new  
   $new_nid = array();  
   $parent_of = array();  
220    
221    // Create the XML parser    // Create the XML parser
222    if (!$xml = xml_parser_create()) {    if (!$xml = xml_parser_create()) {
# Line 259  function bookimport_importxml() { Line 254  function bookimport_importxml() {
254    // Clean up    // Clean up
255    xml_parser_free($xml);    xml_parser_free($xml);
256    
257    make_links($parent_of, $new_nid);    make_links();
258    
259    if (DEBUG > 1) {    if (DEBUG > 1) {
260        print "</pre>";        print "</pre>";

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2