Merge pull request #17381 from eileenmcnaughton/dao
[civicrm-core.git] / xml / GenCode.php
index 01b541c9bdda5857b18d8cebf0f85ac564d52fda..65e13eb23ec75a2ecd0ecb46ef3e1b84bca144ce 100644 (file)
@@ -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));
@@ -28,6 +29,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');
+$GLOBALS['civicrm_paths']['cms.root']['url'] = 'http://gencode.example.com/do-not-use';
 
 require_once 'CRM/Core/ClassLoader.php';
 CRM_Core_ClassLoader::singleton()->register();