From befcb21d403044b51f03691626cbcf2b79876dce Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Fri, 2 Aug 2013 12:08:27 -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/Core/I18n/PseudoConstant.php | 2 +- install/civicrm.php | 2 +- templates/CRM/common/civicrm.settings.php.tpl | 300 ------------------ tools/scripts/mk-drupal-test-site | 2 +- 4 files changed, 3 insertions(+), 303 deletions(-) delete mode 100644 templates/CRM/common/civicrm.settings.php.tpl diff --git a/CRM/Core/I18n/PseudoConstant.php b/CRM/Core/I18n/PseudoConstant.php index ef5ea2be4f..ee4074dc24 100644 --- a/CRM/Core/I18n/PseudoConstant.php +++ b/CRM/Core/I18n/PseudoConstant.php @@ -51,7 +51,7 @@ class CRM_Core_I18n_PseudoConstant { } // hand-crafted enforced overrides for language variants // NB: when adding support for a regional override for a new language below, update - // relevant comments in templates/CRM/common/civicrm.settings.php.tpl as well + // relevant comments in templates/CRM/common/civicrm.settings.php.template as well $longForShortMapping['zh'] = defined("CIVICRM_LANGUAGE_MAPPING_ZH") ? CIVICRM_LANGUAGE_MAPPING_ZH : 'zh_CN'; $longForShortMapping['en'] = defined("CIVICRM_LANGUAGE_MAPPING_EN") ? CIVICRM_LANGUAGE_MAPPING_EN : 'en_US'; $longForShortMapping['fr'] = defined("CIVICRM_LANGUAGE_MAPPING_FR") ? CIVICRM_LANGUAGE_MAPPING_FR : 'fr_FR'; diff --git a/install/civicrm.php b/install/civicrm.php index 21ac16abd1..e306c37f1f 100644 --- a/install/civicrm.php +++ b/install/civicrm.php @@ -216,7 +216,7 @@ function civicrm_config(&$config) { $params['siteKey'] = md5(uniqid('', TRUE) . $params['baseURL']); - $str = file_get_contents($tplPath . 'civicrm.settings.php.tpl'); + $str = file_get_contents($tplPath . 'civicrm.settings.php.template'); foreach ($params as $key => $value) { $str = str_replace('%%' . $key . '%%', $value, $str); } diff --git a/templates/CRM/common/civicrm.settings.php.tpl b/templates/CRM/common/civicrm.settings.php.tpl deleted file mode 100644 index 94d394321b..0000000000 --- a/templates/CRM/common/civicrm.settings.php.tpl +++ /dev/null @@ -1,300 +0,0 @@ -"; - 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(); diff --git a/tools/scripts/mk-drupal-test-site b/tools/scripts/mk-drupal-test-site index 67be6b6882..d5402670cf 100755 --- a/tools/scripts/mk-drupal-test-site +++ b/tools/scripts/mk-drupal-test-site @@ -112,7 +112,7 @@ done ln -s "$CIVI_ROOT" "sites/$SITE_URL/modules/civicrm" -cat "$CIVI_ROOT/templates/CRM/common/civicrm.settings.php.tpl" \ +cat "$CIVI_ROOT/templates/CRM/common/civicrm.settings.php.template" \ | sed "s;%%baseURL%%;http://${SITE_URL};" \ | sed "s;%%cms%%;Drupal;" \ | sed "s;%%CMSdbHost%%;${DB_HOST};" \ -- 2.25.1