Merge pull request #10674 from herbdool/crm20764
authorMathieu Lu <mathieu@bidon.ca>
Wed, 15 Nov 2017 21:27:59 +0000 (16:27 -0500)
committerGitHub <noreply@github.com>
Wed, 15 Nov 2017 21:27:59 +0000 (16:27 -0500)
CRM-20764 Allow clean URLs with CiviCRM on Backdrop

1  2 
templates/CRM/common/civicrm.settings.php.template

index 507b96b13308d78e467662d8c781816ae5e035d1,4aca967b25bad2580721de42ef139811621c3198..e7b88fb624bcfb706ce01d7f92b8cbd890b0f972
@@@ -28,7 -28,6 +28,7 @@@
  /**
   * CiviCRM Configuration File.
   */
 +global $civicrm_root, $civicrm_setting, $civicrm_paths;
  
  /**
   * Content Management System (CMS) Host:
@@@ -76,8 -75,6 +76,8 @@@ if (!defined('CIVICRM_UF_DSN') && CIVIC
    define( 'CIVICRM_UF_DSN'           , 'mysql://%%CMSdbUser%%:%%CMSdbPass%%@%%CMSdbHost%%/%%CMSdbName%%?new_link=true');
  }
  
 +// %%extraSettings%%
 +
  /**
   * CiviCRM Database Settings
   *
@@@ -224,6 -221,8 +224,6 @@@ if (!defined('CIVICRM_UF_BASEURL')) 
   *
   * Uncomment and edit the below as appropriate.
   */
 - // Add this line only once above any settings overrides.
 - //  global $civicrm_setting;
  
   // Override the Temporary Files directory.
   // $civicrm_setting['Directory Preferences']['uploadDir'] = '/path/to/upload-dir' ;
@@@ -309,16 -308,6 +309,16 @@@ if (!defined('CIVICRM_DOMAIN_ID')) 
    define( 'CIVICRM_DOMAIN_ID', 1);
  }
  
 +/**
 + * Setting to define the environment in which this CiviCRM instance is running.
 + * Note the setting here must be value from the option group 'Environment',
 + * (see Administration > System Settings > Option Groups, Options beside Environment)
 + * which by default has three option values: 'Production', 'Staging', 'Development'.
 + * NB: defining a value for environment here prevents it from being set
 + * via the browser.
 + */
 +// $civicrm_setting['domain']['environment'] = 'Production';
 +
  /**
   * Settings to enable external caching using a cache server.  This is an
   * advanced feature, and you should read and understand the documentation
@@@ -454,6 -443,9 +454,9 @@@ if (!defined('CIVICRM_CLEANURL')) 
    if ( function_exists('variable_get') && variable_get('clean_url', '0') != '0') {
      define('CIVICRM_CLEANURL', 1 );
    }
+   elseif ( function_exists('config_get') && config_get('system.core', 'clean_url') != 0) {
+     define('CIVICRM_CLEANURL', 1 );
+   }
    else {
      define('CIVICRM_CLEANURL', 0);
    }