]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
Merge branch 'master' of https://github.com/spin0us/Nominatim
[nominatim.git] / utils / update.php
index edfc53c1e1c8c67f824f2918ba03f232e9244c34..d1ded5adb203df0d7031210b241322fac5185d8d 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
                {
                        // Import the file
                        $sCMD = CONST_Osm2pgsql_Binary.' -klas -C 2000 -O gazetteer -d '.$aDSNInfo['database'].' '.$sNextFile;
-            if (!is_null(CONST_Osm2pgsql_Flatnode_File))
-            {
-                $sCMD .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
-            }
+                       if (!is_null(CONST_Osm2pgsql_Flatnode_File))
+                       {
+                               $sCMD .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
+                       }
                        echo $sCMD."\n";
                        exec($sCMD, $sJunk, $iErrorLevel);
 
 
                // import generated change file
                $sCMD = CONST_Osm2pgsql_Binary.' -klas -C 2000 -O gazetteer -d '.$aDSNInfo['database'].' '.$sTemporaryFile;
-        if (!is_null(CONST_Osm2pgsql_Flatnode_File))
-        {
-            $sCMD .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
-        }
+               if (!is_null(CONST_Osm2pgsql_Flatnode_File))
+               {
+                       $sCMD .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
+               }
                echo $sCMD."\n";
                exec($sCMD, $sJunk, $iErrorLevel);
                if ($iErrorLevel)
                $sCMDDownload = $sOsmosisCMD.' --read-replication-interval workingDirectory='.$sOsmosisConfigDirectory.' --simplify-change --write-xml-change '.$sImportFile;
                $sCMDCheckReplicationLag = $sOsmosisCMD.' -q --read-replication-lag workingDirectory='.$sOsmosisConfigDirectory;
                $sCMDImport = CONST_Osm2pgsql_Binary.' -klas -C 2000 -O gazetteer -d '.$aDSNInfo['database'].' '.$sImportFile;
-        if (!is_null(CONST_Osm2pgsql_Flatnode_File))
-        {
-            $sCMDImport .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
-        }
+               if (!is_null(CONST_Osm2pgsql_Flatnode_File))
+               {
+                       $sCMDImport .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
+               }
                $sCMDIndex = $sBasePath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -t '.$aResult['index-instances'];
                if (!$aResult['no-npi']) {
                        $sCMDIndex .= '-F ';