webtest fixes 4.6
[civicrm-core.git] / install / civicrm.php
index dd189db3b1df2dcdc9cae4da640bcb600bf3e369..ca5db0bc3a1002573303cf1a559bc6c3583bd01d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -36,6 +36,12 @@ function civicrm_setup($filesDirectory) {
   global $crmPath, $sqlPath, $pkgPath, $tplPath;
   global $compileDir;
 
+  $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages';
+  set_include_path($crmPath . PATH_SEPARATOR .
+    $pkgPath . PATH_SEPARATOR .
+    get_include_path()
+  );
+
   $sqlPath = $crmPath . DIRECTORY_SEPARATOR . 'sql';
   $tplPath = $crmPath . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR;
 
@@ -57,7 +63,7 @@ function civicrm_setup($filesDirectory) {
 }
 
 /**
- * @param $name
+ * @param string $name
  * @param $buffer
  */
 function civicrm_write_file($name, &$buffer) {
@@ -124,11 +130,12 @@ function civicrm_main(&$config) {
 
 /**
  * @param $dsn
- * @param $fileName
+ * @param string $fileName
  * @param bool $lineMode
  */
 function civicrm_source($dsn, $fileName, $lineMode = FALSE) {
   global $crmPath;
+
   require_once "$crmPath/packages/DB.php";
 
   $db = DB::connect($dsn);