CRM-14197 alter index to include contribution id
[civicrm-core.git] / install / civicrm.php
index 21ac16abd1c5fa00004f4e9d3bd2490ccdf979c7..11b8931934d1c5e1d59c2aa14523cd413f10538a 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -36,12 +36,6 @@ 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;
 
@@ -123,13 +117,15 @@ function civicrm_main(&$config) {
 
 function civicrm_source($dsn, $fileName, $lineMode = FALSE) {
   global $crmPath;
-
   require_once "$crmPath/packages/DB.php";
 
   $db = DB::connect($dsn);
   if (PEAR::isError($db)) {
     die("Cannot open $dsn: " . $db->getMessage());
   }
+  $db->query("SET NAMES utf8");
+
+  $db->query("SET NAMES utf8");
 
   if (!$lineMode) {
     $string = file_get_contents($fileName);
@@ -216,7 +212,7 @@ function civicrm_config(&$config) {
 
   $params['siteKey'] = md5(uniqid('', TRUE) . $params['baseURL']);
 
-  $str = file_get_contents($tplPath . 'civicrm.settings.php.tpl');
+  $str = file_get_contents($tplPath . 'civicrm.settings.php.template');
   foreach ($params as $key => $value) {
     $str = str_replace('%%' . $key . '%%', $value, $str);
   }