From: Tim Mallezie Date: Fri, 10 Apr 2015 17:13:11 +0000 (+0200) Subject: Use classloader to add packages X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a585d5591928d59f9a97a2a5c4ba7c1c0c3469e0;p=civicrm-core.git Use classloader to add packages --- diff --git a/install/civicrm.php b/install/civicrm.php index b0220a8754..ec423a1938 100644 --- a/install/civicrm.php +++ b/install/civicrm.php @@ -36,12 +36,12 @@ function civicrm_setup($filesDirectory) { global $crmPath, $sqlPath, $pkgPath, $tplPath; global $compileDir; + // Setup classloader // This is needed to allow CiviCRM to be installed by drush. - $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages'; - set_include_path($crmPath . PATH_SEPARATOR . - $pkgPath . PATH_SEPARATOR . - get_include_path() - ); + // TODO: move to civicrm.drush.inc drush_civicrm_install() + global $crmPath; + require_once $crmPath . '/CRM/Core/ClassLoader.php'; + CRM_Core_ClassLoader::singleton()->register(); $sqlPath = $crmPath . DIRECTORY_SEPARATOR . 'sql'; $tplPath = $crmPath . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR;