X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2FGenCode.php;h=78661a911143166a24450c47dfcc68b41dc18c05;hb=f8d2fa9d32bcce4f216f9fc040d9217ff09fe46c;hp=cee7f1475a5df5da572df96fdb93fb333a6454bd;hpb=5caa4dab191ace09ee6fac30a11609ec6d4c7ddf;p=civicrm-core.git diff --git a/xml/GenCode.php b/xml/GenCode.php index cee7f1475a..78661a9111 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,7 @@ 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'); require_once 'CRM/Core/ClassLoader.php'; CRM_Core_ClassLoader::singleton()->register();