#200 dataimport truncates multiline data

closed-fixed
nobody
5
2004-07-01
2004-06-30
No

dataimport.php does not deal with multiline data
correctly. When importing XML data with multiple lines
in one colums, such as:

<column name="internal"><![CDATA[
Status: OK
External db: NONE
Cross-references to external db: No
Numbering system: APExxxx; APESxxx <100 aa
Redundancy: NONE]></column>

only the last line is inserted in the table:
Redundancy: NONE

the bug:
/**
* Character data handler for XML import feature
*/
function _charHandler($parser, $cdata) {
global $data, $misc, $lang;
global $state, $curr_col_val;

if ($state == 'COLUMN') {
// code overwrites data with last line
// $curr_col_val = $cdata;
// correct code appends current line to data:
$curr_col_val .= $cdata;
}
}

Discussion

  • Christopher Kings-Lynne

    • status: open --> closed-fixed
     
  • Christopher Kings-Lynne

    Logged In: YES
    user_id=82305

    Thanks, fixed in CVS and for 3.4.1.

     

Log in to post a comment.