diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-04-25 17:12:01 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-04-25 17:12:01 +0000 |
| commit | 4f437bb190d940af76e681d4619e3f4b0e9990d4 (patch) | |
| tree | 069e4c4187b5407ab06b109b2f7834e80a5bb5ba /import.php | |
| parent | 11ce35ca9e34c21686e8e391168ac3d71978a572 (diff) | |
| download | webtrees-4f437bb190d940af76e681d4619e3f4b0e9990d4.tar.gz webtrees-4f437bb190d940af76e681d4619e3f4b0e9990d4.tar.bz2 webtrees-4f437bb190d940af76e681d4619e3f4b0e9990d4.zip | |
Diffstat (limited to 'import.php')
| -rw-r--r-- | import.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/import.php b/import.php index 0478eda16c..6e9bbc7a38 100644 --- a/import.php +++ b/import.php @@ -118,6 +118,7 @@ for ($end_time=microtime(true)+1.0; microtime(true)<$end_time; ) { if (substr($data, 0, 6)!='0 HEAD') { WT_DB::exec("ROLLBACK"); echo i18n::translate('Invalid GEDCOM file - no header record found.'); + echo WT_JS_START, '$("#actions', $gedcom_id, '").toggle();', WT_JS_END; exit; } // What character set is this? Need to convert it to UTF8 @@ -165,6 +166,7 @@ for ($end_time=microtime(true)+1.0; microtime(true)<$end_time; ) { default: WT_DB::exec("ROLLBACK"); echo '<span class="error">', i18n::translate('Error: cannot convert GEDCOM file from %s encoding to UTF-8 encoding.', $charset), '</span>'; + echo WT_JS_START, '$("#actions', $gedcom_id, '").toggle();', WT_JS_END; exit; } $data=preg_replace('/\n1 CHAR.*(\n[2-9].+)*/', '', $data)."\n1 CHAR UTF-8"; @@ -192,8 +194,9 @@ for ($end_time=microtime(true)+1.0; microtime(true)<$end_time; ) { import_record(trim($rec), $gedcom_id, false); } catch (PDOException $ex) { // A fatal error. Nothing we can do. - echo '<span class="error">', $ex->getMessage(), '</span>'; WT_DB::exec("ROLLBACK"); + echo '<span class="error">', $ex->getMessage(), '</span>'; + echo WT_JS_START, '$("#actions', $gedcom_id, '").toggle();', WT_JS_END; exit; } } |
