]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / utils / update.php
index f82696c215c6217d17237d05383158433c91bdd4..febe06820bceb39cd2846d3df8ae6939b6622a79 100755 (executable)
                        $sNextFile = $aResult['import-diff'];
                        if (!file_exists($sNextFile))
                        {
-                               echo "Cannot open $nextFile\n";
+                               echo "Cannot open $sNextFile\n";
                                exit;
                        }
                        // Don't update the import status - we don't know what this file contains
 
                                                unset($aReplicationLag);
                                                exec($sCMDCheckReplicationLag, $aReplicationLag, $iErrorLevel); 
-                                               while ($iErrorLevel == 1 || $aReplicationLag[0] < 1)
+                                               while ($iErrorLevel > 0 || $aReplicationLag[0] < 1)
                                                {
                                                        if ($iErrorLevel)
                                                        {
                                        $fCMDStartTime = time();
                                        echo $sCMDDownload."\n";
                                        exec($sCMDDownload, $sJunk, $iErrorLevel);
-                                       while ($iErrorLevel == 1)
+                                       while ($iErrorLevel > 0)
                                        {
                                                echo "Error: $iErrorLevel\n";
                                                sleep(60);