<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 5 |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2020 |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM. |
- | |
- | CiviCRM is free software; you can copy, modify, and distribute it |
- | under the terms of the GNU Affero General Public License |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+ | Copyright CiviCRM LLC. All rights reserved. |
| |
- | CiviCRM is distributed in the hope that it will be useful, but |
- | WITHOUT ANY WARRANTY; without even the implied warranty of |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
- | See the GNU Affero General Public License for more details. |
- | |
- | You should have received a copy of the GNU Affero General Public |
- | License and the CiviCRM Licensing Exception along |
- | with this program; if not, contact CiviCRM LLC |
- | at info[AT]civicrm[DOT]org. If you have questions about the |
- | GNU Affero General Public License or the licensing of CiviCRM, |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
* smart caching scheme on a per domain basis
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2020
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
* $Id$
*
*/
'month' => ts('month'),
'year' => ts('year'),
];
- if ($unitType == 'duration') {
+ if ($unitType === 'duration') {
$unitList['lifetime'] = ts('lifetime');
}
return $unitList;
*/
public static function emailSelectMethods() {
return [
- 'automatic' => ts("Automatic"),
- 'location-only' => ts("Only send to email addresses assigned to the specified location"),
- 'location-prefer' => ts("Prefer email addresses assigned to the specified location"),
- 'location-exclude' => ts("Exclude email addresses assigned to the specified location"),
+ 'automatic' => ts('Automatic'),
+ 'location-only' => ts('Only send to email addresses assigned to the specified location'),
+ 'location-prefer' => ts('Prefer email addresses assigned to the specified location'),
+ 'location-exclude' => ts('Exclude email addresses assigned to the specified location'),
];
}
*
* @return array
* the date array
- * @throws \Exception
+ * @throws CRM_Core_Exception
*/
public static function date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL, $context = 'display') {
// These options are deprecated. Definitely not used in datepicker. Possibly not even in jcalendar+addDateTime.
$dao = new CRM_Core_DAO_PreferencesDate();
$dao->name = $type;
if (!$dao->find(TRUE)) {
- CRM_Core_Error::fatal();
+ throw new CRM_Core_Exception('Date preferences not configured.');
}
if (!$maxOffset) {
$maxOffset = $dao->end;
}
if (empty($date['format'])) {
- if ($context == 'Input') {
+ if ($context === 'Input') {
$date['format'] = Civi::settings()->get('dateInputFormat');
}
else {
'{domain.address}' => ts('Domain (organization) address'),
'{domain.phone}' => ts('Domain (organization) phone'),
'{domain.email}' => ts('Domain (organization) email'),
+ '{mailing.key}' => ts('Mailing key'),
'{mailing.name}' => ts('Mailing name'),
'{mailing.group}' => ts('Mailing group'),
'{mailing.viewUrl}' => ts('Mailing permalink'),
*
* @return array
*/
- public static function getSearchBuilderOperators($fieldType = NULL) {
+ public static function getSearchBuilderOperators() {
return [
'=' => '=',
'!=' => '≠',
* Dropdown options for quicksearch in the menu
*
* @return array
+ * @throws \CiviCRM_API3_Exception
*/
public static function quicksearchOptions() {
$includeEmail = civicrm_api3('setting', 'getvalue', ['name' => 'includeEmailInName', 'group' => 'Search Preferences']);