X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=install%2Fcivicrm.php;h=5179735d0825615d07ff8e65da8f3be83e74de41;hb=a1b8cf39cd83602d9560adfa94311b5c4bb83137;hp=0932b1902b58e85622a2632f580a9278ac00adea;hpb=d878bc801e5c1ca7cafadc34766a614b16d9e762;p=civicrm-core.git diff --git a/install/civicrm.php b/install/civicrm.php index 0932b1902b..5179735d08 100644 --- a/install/civicrm.php +++ b/install/civicrm.php @@ -12,8 +12,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2020 - * $Id$ + * @copyright CiviCRM LLC https://civicrm.org/licensing * @param $filesDirectory */ function civicrm_setup($filesDirectory) { @@ -90,7 +89,7 @@ function civicrm_main(&$config) { civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm.mysql'); if (!empty($config['loadGenerated'])) { - civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm_generated.mysql', TRUE); + civicrm_source($dsn, $sqlPath . DIRECTORY_SEPARATOR . 'civicrm_generated.mysql'); } else { if (isset($config['seedLanguage']) @@ -132,8 +131,6 @@ function civicrm_main(&$config) { function civicrm_source($dsn, $fileName, $lineMode = FALSE) { global $crmPath; - require_once "$crmPath/packages/DB.php"; - // CRM-19699 See also CRM_Core_DAO for PHP7 mysqli compatiblity. // Duplicated here because this is not using CRM_Core_DAO directly // and this function may be called directly from Drush. @@ -145,9 +142,7 @@ function civicrm_source($dsn, $fileName, $lineMode = FALSE) { if (PEAR::isError($db)) { die("Cannot open $dsn: " . $db->getMessage()); } - $db->query("SET NAMES utf8"); - - $db->query("SET NAMES utf8"); + $db->query('SET NAMES utf8mb4'); if (!$lineMode) { $string = file_get_contents($fileName); @@ -200,7 +195,7 @@ function civicrm_config(&$config) { global $tplPath, $installType; // Ex: $extraSettings[] = '$civicrm_settings["domain"]["foo"] = "bar";'; - $extraSettings = array(); + $extraSettings = []; $params = array( 'crmRoot' => $crmPath, @@ -210,6 +205,10 @@ function civicrm_config(&$config) { 'dbPass' => addslashes($config['mysql']['password']), 'dbHost' => $config['mysql']['server'], 'dbName' => addslashes($config['mysql']['database']), + // These need to be filled manually when using the old installer if an + // SSL connection to MySQL is needed. + 'dbSSL' => '', + 'CMSdbSSL' => '', ); $params['baseURL'] = $config['base_url'] ?? civicrm_cms_base();