3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * Variables class contains definitions of all the core config settings that are allowed on
30 * CRM_Core_Config. If you want a config variable to be present in run time config object,
31 * it need to be defined here first.
34 * @copyright CiviCRM LLC (c) 2004-2015
38 class CRM_Core_Config_Variables
extends CRM_Core_Config_Defaults
{
41 * The debug level for civicrm.
45 public $backtrace = 0;
48 * The directory where Smarty and plugins are installed.
51 public $smartyDir = NULL;
52 public $pluginsDir = NULL;
55 * The root directory of our template tree.
58 public $templateDir = NULL;
61 * The resourceBase of our application. Used when we want to compose
62 * url's for things like js/images/css
65 public $resourceBase = NULL;
68 * The directory to store uploaded files
70 public $uploadDir = NULL;
73 * The directory to store uploaded image files
75 public $imageUploadDir = NULL;
78 * The directory to store uploaded files in custom data
80 public $customFileUploadDir = NULL;
83 * The url that we can use to display the uploaded images
85 public $imageUploadURL = NULL;
88 * The local path to the default extension container
90 public $extensionsDir;
93 * The url for resources defined by extensions
95 public $extensionsURL = NULL;
98 * Are we generating clean url's and using mod_rewrite
101 public $cleanURL = FALSE;
104 * List of country codes limiting the country list.
105 * 1228 is an id for United States.
108 public $countryLimit = array('1228');
111 * Id of default state/province for contact.
112 * 1046 is an id for Washington(country:United States).
115 public $defaultContactStateProvince;
118 * List of country codes limiting the province list.
119 * 1228 is an id for United States.
122 public $provinceLimit = array('1228');
125 * ISO code of default country for contact.
126 * 1228 is an id for United States.
129 public $defaultContactCountry = '1228';
132 * ISO code of default currency.
135 public $defaultCurrency = 'USD';
138 * Locale for the application to run with.
141 public $lcMessages = 'en_US';
144 * String format for date+time
147 public $dateformatDatetime = '%B %E%f, %Y %l:%M %P';
150 * String format for a full date (one with day, month and year)
153 public $dateformatFull = '%B %E%f, %Y';
156 * String format for a partial date (one with month and year)
159 public $dateformatPartial = '%B %Y';
162 * String format for a year-only date
165 public $dateformatYear = '%Y';
168 * Display format for time
171 public $dateformatTime = '%l:%M %P';
174 * Input format for time
177 public $timeInputFormat = 1;
180 * Input format for date plugin
183 public $dateInputFormat = 'mm/dd/yy';
186 * Month and day on which fiscal year starts.
190 public $fiscalYearStart = array(
196 * String format for monetary amounts
199 public $moneyformat = '%c %a';
202 * String format for monetary values
205 public $moneyvalueformat = '%!i';
208 * Format for monetary amounts
211 public $currencySymbols = '';
214 * Format for monetary amounts
217 public $defaultCurrencySymbol = '$';
220 * Monetary decimal point character
223 public $monetaryDecimalPoint = '.';
226 * Monetary thousands separator
229 public $monetaryThousandSeparator = ',';
232 * Default location of gettext resource files.
234 public $gettextResourceDir = './l10n/';
237 * Default user framework. This basically makes Drupal 7 the default
239 public $userFramework = 'Drupal';
240 public $userFrameworkVersion = 'Unknown';
241 public $userFrameworkUsersTableName = 'users';
242 public $userFrameworkClass = 'CRM_Utils_System_Drupal';
243 public $userHookClass = 'CRM_Utils_Hook_Drupal';
246 * @var string|CRM_Core_Permission_Base
248 public $userPermissionClass = 'CRM_Core_Permission_Drupal';
251 * @var NULL|CRM_Core_Permission_Temp
253 public $userPermissionTemp = NULL;
255 public $userFrameworkURLVar = 'q';
256 public $userFrameworkDSN = NULL;
257 public $userFrameworkBaseURL = NULL;
258 public $userFrameworkResourceURL = NULL;
259 public $userFrameworkFrontend = FALSE;
260 public $userFrameworkLogging = FALSE;
263 * The handle for import file size
266 public $maxImportFileSize = 1048576;
267 public $maxFileSize = 2;
270 * The custom locale strings. Note that these locale strings are stored
271 * in a separate column in civicrm_domain
274 public $localeCustomStrings = NULL;
281 public $mapProvider = NULL;
288 public $mapAPIKey = NULL;
295 public $geoProvider = NULL;
302 public $geoAPIKey = NULL;
305 * How should we get geo code information if google map support needed
309 public $geocodeMethod = '';
316 public $mapGeoCoding = 1;
320 * Whether database-level logging should be performed
323 public $logging = FALSE;
326 * Whether public pages should display "empowered by CiviCRM"
330 public $empoweredBy = TRUE;
333 * Array of enabled add-on components (e.g. CiviContribute, CiviMail...)
337 public $enableComponents = array(
345 public $enableComponentIDs = array(1, 6, 2, 3, 4, 8);
348 * Should payments be accepted only via SSL?
352 public $enableSSL = FALSE;
355 * Fatal error handler
359 public $fatalErrorHandler = NULL;
362 * Legacy encoding for file encoding conversion
366 public $legacyEncoding = 'Windows-1252';
369 * Field separator for import/export csv file
373 public $fieldSeparator = ',';
376 * Max location blocks in address
380 public $maxLocationBlocks = 2;
383 * The font path where captcha fonts are stored
387 public $captchaFontPath = '/usr/X11R6/lib/X11/fonts/';
390 * The font to use for captcha
394 public $captchaFont = 'HelveticaBold.ttf';
397 * Some search settings
399 public $includeWildCardInName = 1;
400 public $includeEmailInName = 1;
401 public $includeNickNameInName = 0;
403 public $smartGroupCacheTimeout = 5;
405 public $defaultSearchProfileID = NULL;
410 public $dashboardCacheTimeout = 1440;
413 * Flag to indicate if acl cache is NOT to be reset
415 public $doNotResetCache = 0;
418 * Optimization related variables
420 public $includeAlphabeticalPager = 1;
421 public $includeOrderByClause = 1;
422 public $oldInputStyle = 1;
425 * Should we disable key generation for forms
429 public $formKeyDisable = FALSE;
432 * determine whether the call is from cms or civicrm
434 public $inCiviCRM = FALSE;
437 * Component registry object (of CRM_Core_Component type)
439 public $componentRegistry = NULL;
442 * PDF receipt as attachment is disabled by default (CRM-8350)
444 public $doNotAttachPDFReceipt = FALSE;
447 * Path to wkhtmltopdf if available
449 public $wkhtmltopdfPath = FALSE;
452 * Allow second-degree relations permission to edit contacts
454 public $secondDegRelPermissions = FALSE;
458 * Allow second-degree relations permission to edit contacts
460 public $wpBasePage = NULL;
463 * Provide addressSequence.
469 public function addressSequence() {
470 $addressFormat = CRM_Core_BAO_Setting
::getItem(CRM_Core_BAO_Setting
::SYSTEM_PREFERENCES_NAME
,
474 return CRM_Utils_Address
::sequence($addressFormat);
478 * Provide cached default currency symbol.
484 public function defaultCurrencySymbol($defaultCurrency = NULL) {
485 static $cachedSymbol = NULL;
486 if (!$cachedSymbol ||
$defaultCurrency) {
487 if ($this->defaultCurrency ||
$defaultCurrency) {
488 $this->currencySymbols
= CRM_Core_PseudoConstant
::get('CRM_Contribute_DAO_Contribution', 'currency', array(
489 'labelColumn' => 'symbol',
490 'orderColumn' => TRUE,
492 $currency = $defaultCurrency ?
$defaultCurrency : $this->defaultCurrency
;
493 $cachedSymbol = CRM_Utils_Array
::value($currency, $this->currencySymbols
, '');
499 return $cachedSymbol;
503 * Provide cached default currency symbol.
509 public function defaultContactCountry() {
510 static $cachedContactCountry = NULL;
512 if (!empty($this->defaultContactCountry
) &&
513 !$cachedContactCountry
515 $countryIsoCodes = CRM_Core_PseudoConstant
::countryIsoCode();
516 $cachedContactCountry = CRM_Utils_Array
::value($this->defaultContactCountry
,
520 return $cachedContactCountry;
524 * Provide cached default country name.
530 public function defaultContactCountryName() {
531 static $cachedContactCountryName = NULL;
532 if (!$cachedContactCountryName && $this->defaultContactCountry
) {
533 $countryCodes = CRM_Core_PseudoConstant
::country();
534 $cachedContactCountryName = $countryCodes[$this->defaultContactCountry
];
536 return $cachedContactCountryName;
540 * Provide cached country limit translated to names.
546 public function countryLimit() {
547 static $cachedCountryLimit = NULL;
548 if (!$cachedCountryLimit) {
549 $countryIsoCodes = CRM_Core_PseudoConstant
::countryIsoCode();
551 if (is_array($this->countryLimit
)) {
552 foreach ($this->countryLimit
as $val) {
554 // some countries have disappeared and hence they might be in country limit
555 // but not in the country table
556 if (isset($countryIsoCodes[$val])) {
557 $country[] = $countryIsoCodes[$val];
562 $country[] = $countryIsoCodes[$this->countryLimit
];
564 $cachedCountryLimit = $country;
566 return $cachedCountryLimit;
570 * Provide cached province limit translated to names.
576 public function provinceLimit() {
577 static $cachedProvinceLimit = NULL;
578 if (!$cachedProvinceLimit) {
579 $countryIsoCodes = CRM_Core_PseudoConstant
::countryIsoCode();
581 if (is_array($this->provinceLimit
)) {
582 foreach ($this->provinceLimit
as $val) {
584 // some countries have disappeared and hence they might be in country limit
585 // but not in the country table
586 if (isset($countryIsoCodes[$val])) {
587 $country[] = $countryIsoCodes[$val];
592 $country[] = $countryIsoCodes[$this->provinceLimit
];
594 $cachedProvinceLimit = $country;
596 return $cachedProvinceLimit;
600 // end CRM_Core_Config