X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/e6c2842b66c607400a0a95b7b8e8de8cd5b12d51..5b46fcad8ec166d1b8e35cfbc58405b71e27caa3:/lib/admin/update.php?ds=sidebyside diff --git a/lib/admin/update.php b/lib/admin/update.php index 48609c3e..a0fbbc46 100644 --- a/lib/admin/update.php +++ b/lib/admin/update.php @@ -4,7 +4,6 @@ require_once(CONST_LibDir.'/init-cmd.php'); require_once(CONST_LibDir.'/setup_functions.php'); require_once(CONST_LibDir.'/setup/SetupClass.php'); -require_once(CONST_LibDir.'/setup/AddressLevelParser.php'); ini_set('memory_limit', '800M'); @@ -144,12 +143,7 @@ if ($aResult['init-updates']) { } if (!$aResult['no-update-functions']) { - // instantiate setupClass to use the function therein - $cSetup = new SetupFunctions(array( - 'enable-diff-updates' => true, - 'verbose' => $aResult['verbose'] - )); - $cSetup->createFunctions(); + (clone($oNominatimCmd))->addParams('refresh', '--functions')->run(); } $sDatabaseDate = getDatabaseDate($oDB); @@ -275,10 +269,7 @@ if ($aResult['index']) { } if ($aResult['update-address-levels']) { - $sAddressLevelConfig = getSettingConfig('ADDRESS_LEVEL_CONFIG', 'address-levels.json'); - echo 'Updating address levels from '.$sAddressLevelConfig.".\n"; - $oAlParser = new \Nominatim\Setup\AddressLevelParser($sAddressLevelConfig); - $oAlParser->createTable($oDB, 'address_levels'); + (clone($oNominatimCmd))->addParams('refresh', '--address-levels')->run(); } if ($aResult['recompute-importance']) {