X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2FGenCode.php;h=65e13eb23ec75a2ecd0ecb46ef3e1b84bca144ce;hb=269f890e9d450ccbc54a91edb226e038d3800bce;hp=cee7f1475a5df5da572df96fdb93fb333a6454bd;hpb=2e47b4f361f2fe657d0cecb97311b1c8248ff051;p=civicrm-core.git diff --git a/xml/GenCode.php b/xml/GenCode.php index cee7f1475a..65e13eb23e 100644 --- a/xml/GenCode.php +++ b/xml/GenCode.php @@ -4,7 +4,8 @@ if (PHP_SAPI !== 'cli') { die("GenCode can only be run from command line."); } -ini_set('include_path', '.' . PATH_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR . '..'); +$includes = ['.', '../packages', '../../civicrm-packages', '..']; +ini_set('include_path', implode(PATH_SEPARATOR, $includes)); // make sure the memory_limit is at least 512 MB $memLimitString = trim(ini_get('memory_limit')); $memLimitUnit = strtolower(substr($memLimitString, -1)); @@ -27,6 +28,8 @@ date_default_timezone_set('UTC'); define('CIVICRM_UF', 'Drupal'); define('CIVICRM_UF_BASEURL', '/'); +define('CIVICRM_L10N_BASEDIR', getenv('CIVICRM_L10N_BASEDIR') ? getenv('CIVICRM_L10N_BASEDIR') : __DIR__ . '/../l10n'); +$GLOBALS['civicrm_paths']['cms.root']['url'] = 'http://gencode.example.com/do-not-use'; require_once 'CRM/Core/ClassLoader.php'; CRM_Core_ClassLoader::singleton()->register();