CRM-19068 remove references to 'descendant groups for an org'
[civicrm-core.git] / install / civicrm.php
index 767a38ebd41d88cfb8d4fb13c357d38b38a66bbf..c23bf6020b4d364aef7ed6c7f6145dc5a964829a 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
  * $Id$
  * @param $filesDirectory
  */
@@ -88,6 +88,9 @@ function civicrm_main(&$config) {
       $siteDir . DIRECTORY_SEPARATOR . 'files'
     );
   }
+  elseif ($installType == 'backdrop') {
+    civicrm_setup($cmsPath . DIRECTORY_SEPARATOR . 'files');
+  }
   elseif ($installType == 'wordpress') {
     $upload_dir = wp_upload_dir();
     $files_dirname = $upload_dir['basedir'];
@@ -120,6 +123,9 @@ function civicrm_main(&$config) {
   if ($installType == 'drupal') {
     $configFile = $cmsPath . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . $siteDir . DIRECTORY_SEPARATOR . 'civicrm.settings.php';
   }
+  elseif ($installType == 'backdrop') {
+    $configFile = $cmsPath . DIRECTORY_SEPARATOR . 'civicrm.settings.php';
+  }
   elseif ($installType == 'wordpress') {
     $configFile = $files_dirname . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR . 'civicrm.settings.php';
   }
@@ -233,6 +239,13 @@ function civicrm_config(&$config) {
     $params['CMSdbHost'] = $config['cmsdb']['server'];
     $params['CMSdbName'] = addslashes($config['cmsdb']['database']);
   }
+  elseif ($installType == 'backdrop') {
+    $params['cms'] = 'Backdrop';
+    $params['CMSdbUser'] = addslashes($config['backdrop']['username']);
+    $params['CMSdbPass'] = addslashes($config['backdrop']['password']);
+    $params['CMSdbHost'] = $config['backdrop']['server'];
+    $params['CMSdbName'] = addslashes($config['backdrop']['database']);
+  }
   else {
     $params['cms'] = 'WordPress';
     $params['CMSdbUser'] = addslashes(DB_USER);
@@ -275,7 +288,7 @@ function civicrm_cms_base() {
 
   $baseURL = $_SERVER['SCRIPT_NAME'];
 
-  if ($installType == 'drupal') {
+  if ($installType == 'drupal' || $installType == 'backdrop') {
     //don't assume 6 dir levels, as civicrm
     //may or may not be in sites/all/modules/
     //lets allow to install in custom dir. CRM-6840