3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.3 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
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-2013
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 encoding of strings returned by gettext
235 public $gettextCodeset = 'utf-8';
238 * Default name for gettext domain.
241 public $gettextDomain = 'civicrm';
244 * Default location of gettext resource files.
246 public $gettextResourceDir = './l10n/';
249 * Default user framework. This basically makes Drupal 7 the default
251 public $userFramework = 'Drupal';
252 public $userFrameworkVersion = 'Unknown';
253 public $userFrameworkUsersTableName = 'users';
254 public $userFrameworkClass = 'CRM_Utils_System_Drupal';
255 public $userHookClass = 'CRM_Utils_Hook_Drupal';
256 public $userPermissionClass = 'CRM_Core_Permission_Drupal';
257 public $userFrameworkURLVar = 'q';
258 public $userFrameworkDSN = NULL;
259 public $userFrameworkBaseURL = NULL;
260 public $userFrameworkResourceURL = NULL;
261 public $userFrameworkFrontend = FALSE;
262 public $userFrameworkLogging = FALSE;
265 * the handle for import file size
268 public $maxImportFileSize = 1048576;
269 public $maxFileSize = 2;
272 * The custom locale strings. Note that these locale strings are stored
273 * in a separate column in civicrm_domain
276 public $localeCustomStrings = NULL;
283 public $mapProvider = NULL;
290 public $mapAPIKey = NULL;
297 public $geoProvider = NULL;
304 public $geoAPIKey = NULL;
307 * How should we get geo code information if google map support needed
311 public $geocodeMethod = '';
318 public $mapGeoCoding = 1;
322 * Whether database-level logging should be performed
325 public $logging = FALSE;
328 * Whether CiviCRM should check for newer versions
332 public $versionCheck = TRUE;
335 * Array of enabled add-on components (e.g. CiviContribute, CiviMail...)
339 public $enableComponents = array(
340 'CiviContribute', 'CiviPledge', 'CiviMember',
341 'CiviEvent', 'CiviMail', 'CiviReport',
343 public $enableComponentIDs = array(1, 6, 2, 3, 4, 8);
346 * Should payments be accepted only via SSL?
350 public $enableSSL = FALSE;
353 * error template to use for fatal errors
357 public $fatalErrorTemplate = 'CRM/common/fatal.tpl';
360 * fatal error handler
364 public $fatalErrorHandler = NULL;
367 * legacy encoding for file encoding conversion
371 public $legacyEncoding = 'Windows-1252';
374 * field separator for import/export csv file
378 public $fieldSeparator = ',';
381 * max location blocks in address
385 public $maxLocationBlocks = 2;
388 * the font path where captcha fonts are stored
392 public $captchaFontPath = '/usr/X11R6/lib/X11/fonts/';
395 * the font to use for captcha
399 public $captchaFont = 'HelveticaBold.ttf';
402 * Some search settings
404 public $includeWildCardInName = 1;
405 public $includeEmailInName = 1;
406 public $includeNickNameInName = 0;
408 public $smartGroupCacheTimeout = 5;
410 public $defaultSearchProfileID = NULL;
415 public $dashboardCacheTimeout = 1440;
418 * flag to indicate if acl cache is NOT to be reset
420 public $doNotResetCache = 0;
423 * Optimization related variables
425 public $includeAlphabeticalPager = 1;
426 public $includeOrderByClause = 1;
427 public $oldInputStyle = 1;
430 * should we disbable key generation for forms
434 public $formKeyDisable = FALSE;
437 * to determine wether the call is from cms or civicrm
439 public $inCiviCRM = FALSE;
442 * component registry object (of CRM_Core_Component type)
444 public $componentRegistry = NULL;
447 * PDF reciept as attachment is disabled by default (CRM-8350)
449 public $doNotAttachPDFReceipt = FALSE;
452 * Path to wkhtmltopdf if available
454 public $wkhtmltopdfPath = FALSE;
457 * Allow second-degree relations permission to edit contacts
459 public $secondDegRelPermissions = FALSE;
463 * Allow second-degree relations permission to edit contacts
465 public $wpBasePage = NULL;
468 * Provide addressSequence
474 public function addressSequence() {
475 $addressFormat = CRM_Core_BAO_Setting
::getItem(CRM_Core_BAO_Setting
::SYSTEM_PREFERENCES_NAME
,
479 return CRM_Utils_Address
::sequence($addressFormat);
483 * Provide cached default currency symbol
489 public function defaultCurrencySymbol($defaultCurrency = NULL) {
490 static $cachedSymbol = NULL;
491 if (!$cachedSymbol ||
$defaultCurrency) {
492 if ($this->defaultCurrency ||
$defaultCurrency) {
493 $this->currencySymbols
= CRM_Contribute_BAO_Contribution
::buildOptions('currency');
494 $currency = $defaultCurrency ?
$defaultCurrency : $this->defaultCurrency
;
495 $cachedSymbol = CRM_Utils_Array
::value($currency, $this->currencySymbols
, '');
501 return $cachedSymbol;
505 * Provide cached default currency symbol
511 public function defaultContactCountry() {
512 static $cachedContactCountry = NULL;
514 if (!empty($this->defaultContactCountry
) &&
515 !$cachedContactCountry
517 $countryIsoCodes = CRM_Core_PseudoConstant
::countryIsoCode();
518 $cachedContactCountry = CRM_Utils_Array
::value($this->defaultContactCountry
,
522 return $cachedContactCountry;
526 * Provide cached default country name
532 public function defaultContactCountryName() {
533 static $cachedContactCountryName = NULL;
534 if (!$cachedContactCountryName) {
535 $countryCodes = CRM_Core_PseudoConstant
::country();
536 $cachedContactCountryName = $countryCodes[$this->defaultContactCountry
];
538 return $cachedContactCountryName;
542 * Provide cached country limit translated to names
548 public function countryLimit() {
549 static $cachedCountryLimit = NULL;
550 if (!$cachedCountryLimit) {
551 $countryIsoCodes = CRM_Core_PseudoConstant
::countryIsoCode();
553 if (is_array($this->countryLimit
)) {
554 foreach ($this->countryLimit
as $val) {
556 // some countries have disappeared and hence they might be in country limit
557 // but not in the country table
558 if (isset($countryIsoCodes[$val])) {
559 $country[] = $countryIsoCodes[$val];
564 $country[] = $countryIsoCodes[$this->countryLimit
];
566 $cachedCountryLimit = $country;
568 return $cachedCountryLimit;
572 * Provide cached province limit translated to names
578 public function provinceLimit() {
579 static $cachedProvinceLimit = NULL;
580 if (!$cachedProvinceLimit) {
581 $countryIsoCodes = CRM_Core_PseudoConstant
::countryIsoCode();
583 if (is_array($this->provinceLimit
)) {
584 foreach ($this->provinceLimit
as $val) {
585 $country[] = $countryIsoCodes[$val];
589 $country[] = $countryIsoCodes[$this->provinceLimit
];
591 $cachedProvinceLimit = $country;
593 return $cachedProvinceLimit;
596 // end CRM_Core_Config