diff --git a/phpgwapi/inc/class.db_backup.inc.php b/phpgwapi/inc/class.db_backup.inc.php index 76201046d8..49ac4d50a0 100644 --- a/phpgwapi/inc/class.db_backup.inc.php +++ b/phpgwapi/inc/class.db_backup.inc.php @@ -261,20 +261,27 @@ class db_backup } if ($table) // do we already reached the data part { + $import = true; $data = $this->csv_split($line,$cols); - - if (count($data) == count($cols)) - { - if ($convert_to_system_charset && !$this->db->capabilities['client_encoding']) - { - $translation->convert($data,$charset); - } - $this->db->insert($table,$data,False,__LINE__,__FILE__,'all-apps',true); - } - else - { - echo '
'.lang("Line %1: '%2'
csv data does not match column-count of table %3 ==> ignored",$n,$line,$table)."
'.lang("Line %1: '%2'
csv data does contain ##last-check-run## of table %3 ==> ignored",$n,$line,$table)."
'.print_r($data,true)."\n"; + $import = false; + } + if ($import) { + if (count($data) == count($cols)) + { + if ($convert_to_system_charset && !$this->db->capabilities['client_encoding']) + { + $translation->convert($data,$charset); + } + $this->db->insert($table,$data,False,__LINE__,__FILE__,'all-apps',true); + } + else + { + echo '
'.lang("Line %1: '%2'
csv data does not match column-count of table %3 ==> ignored",$n,$line,$table)."
'.print_r($data,true)."\n"; + } } } } @@ -531,4 +538,4 @@ $line = '"de","ranking","use \\"yes\\", or \\"no, prefession\\"","benützen Sie echo "
line='$line'
\n"; echo "".print_r(db_backup::csv_split($line),true)."\n"; -*/ \ No newline at end of file +*/