X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=install%2Fcivicrm.php;h=591079d3cd73cb6a31f42d3617c1fb8b6d7c4ca7;hb=d22caf0c39931e82710653e313b1165cfbcf71db;hp=50e42710811059fb85a438bcf007c5259777be22;hpb=73c8d0c580b7dcd609389d8b4b7f801e81ea119c;p=civicrm-core.git diff --git a/install/civicrm.php b/install/civicrm.php index 50e4271081..591079d3cd 100644 --- a/install/civicrm.php +++ b/install/civicrm.php @@ -84,8 +84,7 @@ function civicrm_main(&$config) { if ($installType == 'drupal') { $siteDir = isset($config['site_dir']) ? $config['site_dir'] : getSiteDir($cmsPath, $_SERVER['SCRIPT_FILENAME']); - civicrm_setup($cmsPath . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . - $siteDir . DIRECTORY_SEPARATOR . 'files' + civicrm_setup($cmsPath . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . $siteDir . DIRECTORY_SEPARATOR . 'files' ); } elseif ($installType == 'backdrop') { @@ -139,7 +138,6 @@ function civicrm_main(&$config) { civicrm_write_file($configFile, $string ); - } /** @@ -217,6 +215,9 @@ function civicrm_config(&$config) { global $compileDir; global $tplPath, $installType; + // Ex: $extraSettings[] = '$civicrm_settings["domain"]["foo"] = "bar";'; + $extraSettings = array(); + $params = array( 'crmRoot' => $crmPath, 'templateCompileDir' => $compileDir, @@ -274,6 +275,18 @@ function civicrm_config(&$config) { // CRM-12386 $params['crmRoot'] = addslashes($params['crmRoot']); + //CRM-16421 + + $extraSettings[] = sprintf('$civicrm_paths[\'wp.frontend.base\'][\'url\'] = %s;', var_export(home_url() . '/', 1)); + $extraSettings[] = sprintf('$civicrm_paths[\'wp.backend.base\'][\'url\'] = %s;', var_export(admin_url(), 1)); + $extraSettings[] = sprintf('$civicrm_setting[\'URL Preferences\'][\'userFrameworkResourceURL\'] = %s;', var_export(plugin_dir_url(CIVICRM_PLUGIN_FILE) . 'civicrm', 1)); + } + + if ($extraSettings) { + $params['extraSettings'] = "Additional settings generated by installer:\n" . implode("\n", $extraSettings); + } + else { + $params['extraSettings'] = ""; } $params['siteKey'] = md5(rand() . mt_rand() . rand() . uniqid('', TRUE) . $params['baseURL']);