From a585d5591928d59f9a97a2a5c4ba7c1c0c3469e0 Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Fri, 10 Apr 2015 19:13:11 +0200 Subject: [PATCH] Use classloader to add packages --- install/civicrm.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; -- 2.25.1