diff --git a/phpgwapi/inc/class.db_backup.inc.php b/phpgwapi/inc/class.db_backup.inc.php index 10ad6280aa..747ebf711c 100644 --- a/phpgwapi/inc/class.db_backup.inc.php +++ b/phpgwapi/inc/class.db_backup.inc.php @@ -232,20 +232,27 @@ } 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"; + } } } } @@ -501,4 +508,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 +*/