moving functions from setup.php to a lib file in lib/setup_functions.php and change a passthru in setup.php by calling the function with this new lib

This commit is contained in:
ThomasBarris
2018-08-24 16:15:39 +02:00
parent e7b738fe35
commit 14aca11dcd
3 changed files with 991 additions and 895 deletions

View File

@@ -3,8 +3,10 @@
require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
require_once(CONST_BasePath.'/lib/init-cmd.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
@@ -99,12 +101,7 @@ if ($aResult['init-updates']) {
fail('pyosmium-get-changes not found or not usable');
}
if (!$aResult['no-update-functions']) {
$sSetup ='@PHP_BIN@ '. CONST_InstallPath.'/utils/setup.php';
$iRet = -1;
passthru($sSetup.' --create-functions --enable-diff-updates', $iRet);
if ($iRet != 0) {
fail('Error running setup script');
}
createFunctions($aCMDResult);
}
$sDatabaseDate = getDatabaseDate($oDB);