Index: trunk/core/units/languages/import_xml.php =================================================================== diff -u -N -r2308 -r3061 --- trunk/core/units/languages/import_xml.php (.../import_xml.php) (revision 2308) +++ trunk/core/units/languages/import_xml.php (.../import_xml.php) (revision 3061) @@ -191,13 +191,15 @@ 'PhraseType' => $attributes['TYPE'], 'Module' => $phrase_module, 'LastChanged' => time(), - 'LastChangeIP' => $this->ip_address ); + 'LastChangeIP' => $this->ip_address, + 'Translation' => ''); break; case 'LANGUAGES LANGUAGE EVENTS EVENT': $this->current_event = Array( 'LanguageId' => $this->current_language['LanguageId'], 'EventId' => $this->events_hash[ $attributes['EVENT'].'_'.$attributes['TYPE'] ], - 'MessageType' => $attributes['MESSAGETYPE']); + 'MessageType' => $attributes['MESSAGETYPE'], + 'Template' => ''); break; @@ -234,22 +236,37 @@ case 'LANGUAGES LANGUAGE PHRASES PHRASE': if( isset($this->phrase_types_allowed[ $this->current_phrase['PhraseType'] ]) ) { - $this->current_phrase['Translation'] = base64_decode($line); - $this->insertRecord($this->tables['phrases'], $this->current_phrase); + $this->current_phrase['Translation'] .= $line; } break; case 'LANGUAGES LANGUAGE EVENTS EVENT': - $this->current_event['Template'] = base64_decode($line); - $this->insertRecord($this->tables['emailmessages'],$this->current_event); + $this->current_event['Template'] .= $line; break; } } } function endElement(&$parser, $element) { - $path = implode(' ',$this->path); + $path = implode(' ',$this->path); + + switch($path) + { + case 'LANGUAGES LANGUAGE PHRASES PHRASE': + if( isset($this->phrase_types_allowed[ $this->current_phrase['PhraseType'] ]) ) + { + $this->current_phrase['Translation'] = base64_decode($this->current_phrase['Translation']); + $this->insertRecord($this->tables['phrases'], $this->current_phrase); + } + break; + + case 'LANGUAGES LANGUAGE EVENTS EVENT': + $this->current_event['Template'] = base64_decode($this->current_event['Template']); + $this->insertRecord($this->tables['emailmessages'],$this->current_event); + break; + } + array_pop($this->path); }