From 6bb48b2b87c8b56a0299fb4dbb7de19518afbdec Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 25 Jul 2008 09:49:39 +0000 Subject: [PATCH] egw_async: handling the ##last-check-run## problem during restore. The line will be skipped. --- phpgwapi/inc/class.db_backup.inc.php | 33 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) 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)."

\n"; + if ($table == 'egw_async' && in_array('##last-check-run##',$data)) { + echo '

'.lang("Line %1: '%2'
csv data does contain ##last-check-run## of table %3 ==> ignored",$n,$line,$table)."

\n"; echo 'data=
'.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)."

\n"; + echo 'data=
'.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 +*/