diff options
| author | fisharebest <fisharebest@gmail.com> | 2013-05-12 07:58:25 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2013-05-12 07:58:25 +0000 |
| commit | 804dec82eef68b5999c5b9374bfb10ed62d86f0d (patch) | |
| tree | 7cc2ad54dfa9cbc238337928aad5f8ffffbbd677 | |
| parent | 42ffc1212126195726417eb0f502eebf67080dc5 (diff) | |
| download | webtrees-804dec82eef68b5999c5b9374bfb10ed62d86f0d.tar.gz webtrees-804dec82eef68b5999c5b9374bfb10ed62d86f0d.tar.bz2 webtrees-804dec82eef68b5999c5b9374bfb10ed62d86f0d.zip | |
Since (recent upgrade of jQuery?? or before?? or something else??), the jQuery.load() function is being cached, rather than loading the next chunk of GEDCOM. Add uniqid() to thwart this.
| -rw-r--r-- | import.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/import.php b/import.php index 9e8d36549b..4d89729555 100644 --- a/import.php +++ b/import.php @@ -222,7 +222,7 @@ for ($end_time=microtime(true)+1.0; microtime(true)<$end_time; ) { // "SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction" // The documentation says that if you get this error, wait and try again..... sleep(1); - $controller->addInlineJavascript('jQuery("#import'.$gedcom_id.'").load("import.php?gedcom_id='.$gedcom_id.'");'); + $controller->addInlineJavascript('jQuery("#import'.$gedcom_id.'").load("import.php?gedcom_id='.$gedcom_id.'&u='.uniqid().'");'); } else { // A fatal error. Nothing we can do? echo '<span class="error">', $ex->getMessage(), '</span>'; @@ -235,4 +235,5 @@ for ($end_time=microtime(true)+1.0; microtime(true)<$end_time; ) { WT_DB::exec("COMMIT"); // Reload..... -$controller->addInlineJavascript('jQuery("#import'.$gedcom_id.'").load("import.php?gedcom_id='.$gedcom_id.'");'); +// Use uniqid() to prevent jQuery caching the previous response. +$controller->addInlineJavascript('jQuery("#import'.$gedcom_id.'").load("import.php?gedcom_id='.$gedcom_id.'&u='.uniqid().'");'); |
