From eb049397b8887bf41583db3e9a6a9df4db9fd148 Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Fri, 2 Aug 2013 12:10:51 -0700 Subject: [PATCH] CRM-12874 ---------------------------------------- * CRM-12874: Rename civicrm.settings.php.tpl so it uses a different suffix from Smarty templates http://issues.civicrm.org/jira/browse/CRM-12874 --- .../CRM/common/civicrm.settings.php.template | 300 ++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 templates/CRM/common/civicrm.settings.php.template diff --git a/templates/CRM/common/civicrm.settings.php.template b/templates/CRM/common/civicrm.settings.php.template new file mode 100644 index 0000000000..1d86303b5f --- /dev/null +++ b/templates/CRM/common/civicrm.settings.php.template @@ -0,0 +1,300 @@ +"; + exit( ); +} + +if ( function_exists( 'variable_get' ) && variable_get('clean_url', '0') != '0' ) { + define( 'CIVICRM_CLEANURL', 1 ); +} else { + define( 'CIVICRM_CLEANURL', 0 ); +} + +// force PHP to auto-detect Mac line endings +ini_set('auto_detect_line_endings', '1'); + +// make sure the memory_limit is at least 64 MB +$memLimitString = trim(ini_get('memory_limit')); +$memLimitUnit = strtolower(substr($memLimitString, -1)); +$memLimit = (int) $memLimitString; +switch ($memLimitUnit) { + case 'g': $memLimit *= 1024; + case 'm': $memLimit *= 1024; + case 'k': $memLimit *= 1024; +} +if ($memLimit >= 0 and $memLimit < 134217728) { + ini_set('memory_limit', '128M'); +} + +require_once 'CRM/Core/ClassLoader.php'; +CRM_Core_ClassLoader::singleton()->register(); -- 2.25.1