X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/dd03aeb966c2a101759d447a0fa00340812c89da..90a5d2301610142994e75311be8ef9ca4643aafb:/lib-php/admin/setup.php?ds=inline diff --git a/lib-php/admin/setup.php b/lib-php/admin/setup.php index 3aa6b828..f8e360bb 100644 --- a/lib-php/admin/setup.php +++ b/lib-php/admin/setup.php @@ -57,23 +57,24 @@ setupHTTPProxy(); $bDidSomething = false; $oNominatimCmd = new \Nominatim\Shell(getSetting('NOMINATIM_TOOL')); -if (isset($aCMDResult['quiet']) && $aCMDResult['quiet']) { - $oNominatimCmd->addParams('--quiet'); -} -if ($aCMDResult['verbose']) { - $oNominatimCmd->addParams('--verbose'); -} // by default, use all but one processor, but never more than 15. $iInstances = max(1, $aCMDResult['threads'] ?? (min(16, getProcessorCount()) - 1)); -function run($oCmd) { +function run($oCmd) +{ global $iInstances; global $aCMDResult; $oCmd->addParams('--threads', $iInstances); if ($aCMDResult['ignore-errors'] ?? false) { $oCmd->addParams('--ignore-errors'); } + if ($aCMDResult['quiet'] ?? false) { + $oCmd->addParams('--quiet'); + } + if ($aCMDResult['verbose'] ?? false) { + $oCmd->addParams('--verbose'); + } $oCmd->run(true); }