]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
splitted createTables and changed formatting to please Travis
[nominatim.git] / utils / update.php
index 038313f3e54fc84351242de5a6a7979b010f7b52..fd361eb8f52afc50dc1d79a410a761947b0f5837 100755 (executable)
@@ -3,9 +3,10 @@
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
 require_once(CONST_BasePath.'/lib/init-cmd.php');
-include_once(CONST_InstallPath.'/utils/setup_functions.php');
+include_once(CONST_BasePath.'/lib/setup_functions.php');
 ini_set('memory_limit', '800M');
 
+
 # (long-opt, short-opt, min-occurs, max-occurs, num-arguments, num-arguments, type, help)
 
 $aCMDOptions
@@ -100,16 +101,7 @@ if ($aResult['init-updates']) {
         fail('pyosmium-get-changes not found or not usable');
     }
     if (!$aResult['no-update-functions']) {
-        $sSetup = CONST_InstallPath.'/utils/setup.php';
-        $iRet = -1;
-        $aCMDResult['create-functions'] = true;
-        $aCMDResult['enable-diff-updates'] = true;
-        # passthru($sSetup.' --create-functions --enable-diff-updates', $iRet);
-        create_functions($aCMDResult);
-
-        if ($iRet != 0) {
-            fail('Error running setup script');
-        }
+        createFunctions($aCMDResult);
     }
 
     $sDatabaseDate = getDatabaseDate($oDB);