]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 27 May 2017 15:03:59 +0000 (17:03 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 27 May 2017 15:03:59 +0000 (17:03 +0200)
1  2 
utils/update.php

diff --combined utils/update.php
index 972a6fdf8a91e83129dc20f3c23b404b162e8b9e,2b72fe821e0e390fa9ea5f5690758d8ec6aaa63f..f7f20aa3f76fc14541e87dd0d5feaccfcd19f449
@@@ -38,7 -38,6 +38,7 @@@ $aCMDOption
  getCmdOpt($_SERVER['argv'], $aCMDOptions, $aResult, true, true);
  
  if (!isset($aResult['index-instances'])) $aResult['index-instances'] = 1;
 +
  if (!isset($aResult['index-rank'])) $aResult['index-rank'] = 0;
  
  date_default_timezone_set('Etc/UTC');
@@@ -263,12 -262,12 +263,12 @@@ if ($aResult['import-osmosis'] || $aRes
              }
  
              // Download the next batch of changes.
-             unlink($sImportFile);
              do {
                  $fCMDStartTime = time();
-                 $iNextSeq = (int) $aLastState['sequence_id'] + 1;
+                 $iNextSeq = (int) $aLastState['sequence_id'];
                  unset($aOutput);
                  echo "$sCMDDownload -I $iNextSeq\n";
+                 unlink($sImportFile);
                  exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult);
  
                  if ($iResult == 3) {