/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2020
- * $Id$
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
* @param $filesDirectory
*/
function civicrm_setup($filesDirectory) {
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'])
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.
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);
global $tplPath, $installType;
// Ex: $extraSettings[] = '$civicrm_settings["domain"]["foo"] = "bar";';
- $extraSettings = array();
+ $extraSettings = [];
$params = array(
'crmRoot' => $crmPath,
'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();