Skip to content

Commit cef0716

Browse files
committed
Upgrade to CiviCRM 5.29.1
Includes new features, bug fixes. Requires database updates. Notes: * https://github.com/civicrm/civicrm-core/blob/master/release-notes/5.29.0.md * https://github.com/civicrm/civicrm-core/blob/master/release-notes/5.29.1.md * Removed a few patches that are no longer needed for installing CiviCRM Starterkit on Pantheon. Backup your site using Pantheon's backup tool first. Then either go to http://<your_drupal_home>/civicrm/upgrade?reset=1 or use terminus drush site.env civicrm-upgrade-db. Fully test on a dev environment before upgrading on live. If you have questions contact https://civicrmstarterkit.org/contact. We provide some basic general support for the public. If you require help with your specific website there will likely be a cost.
1 parent c12e84a commit cef0716

File tree

1,248 files changed

+12494
-24561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,248 files changed

+12494
-24561
lines changed

profiles/civicrm_starterkit/civicrm_starterkit.make

+2-25
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ projects[drupal][version] = "7.61"
1313
; ====== CIVICRM RELATED =========
1414

1515
libraries[civicrm][download][type] = get
16-
libraries[civicrm][download][url] = "https://download.civicrm.org/civicrm-5.28.4-drupal.tar.gz"
16+
libraries[civicrm][download][url] = "https://download.civicrm.org/civicrm-5.29.1-drupal.tar.gz"
1717
libraries[civicrm][destination] = modules
1818
libraries[civicrm][directory_name] = civicrm
1919

@@ -31,39 +31,16 @@ libraries[civicrm][patch][ipnstd] = ./patches/ipnStd.patch
3131

3232
; === Installer ===
3333

34-
; Ensure the baseURL is correct in the installer in Pantheon.
35-
libraries[civicrm][patch][installerbaseurl] = ./patches/installer-baseurl.patch
36-
37-
; Related to https://issues.civicrm.org/jira/browse/CRM-9683
38-
libraries[civicrm][patch][2130213] = ./patches/ignore-timezone-on-install-47-2130213.patch
39-
4034
; Necessary if CiviCRM in profiles/*/modules/civicrm
4135
; Define the path to the civicrm.settings.php file because CiviCRM is not in the expected location.
36+
; Required for anything not doing a full bootstrap.
4237
; https://www.drupal.org/node/1844558
4338
libraries[civicrm][patch][1844558] = ./patches/settings_location-for-profiles.patch
44-
; https://www.drupal.org/node/2063371
45-
libraries[civicrm][patch][2063371] = ./patches/2063371-add-modulePath-var-4-4.patch
46-
47-
; Populate with Pantheon environment settings on install
48-
; https://www.drupal.org/node/1978838
49-
libraries[civicrm][patch][pre-populate-installer] = ./patches/pre-populate-installer.patch
50-
; https://www.drupal.org/node/1849424
51-
libraries[civicrm][patch][1849424-pass] = ./patches/pass-vars-in-install-link.patch
52-
53-
; Cached Symfony container
54-
; This is a potential issue but not clear at the moment--like it will just rebuild the php file.
55-
; If concerned can set it to skip caching the container. In civicrm.settings.php set:
56-
; define('CIVICRM_CONTAINER_CACHE', 'never');
5739

5840
; [OPTIONAL] SMTP patch for PHP 5.6+
5941
; https://civicrm.stackexchange.com/questions/16628/outgoing-mail-settings-civismtp-php-5-6-x-problem
6042
libraries[civicrm][patch][smtpverify] = ./patches/smtp-disable-peer-verification.patch
6143

62-
; Prevent validation on Paypal button
63-
; https://lab.civicrm.org/dev/financial/-/issues/147
64-
; @todo remove in 5.30.0
65-
libraries[civicrm][patch][paypalclick] = https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-core/pull/18459.patch
66-
6744
; === Modules ===
6845

6946
projects[captcha][subdir] = "contrib"

profiles/civicrm_starterkit/modules/civicrm/2063371-add-modulePath-var-4-4.patch

-21
This file was deleted.

profiles/civicrm_starterkit/modules/civicrm/CRM/ACL/API.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public static function groupPermission(
189189
}
190190

191191
if (!$contactID) {
192-
$contactID = CRM_Core_Session::singleton()->getLoggedInContactID();
192+
$contactID = CRM_Core_Session::getLoggedInContactID();
193193
}
194194

195195
$key = "{$tableName}_{$type}_{$contactID}";

profiles/civicrm_starterkit/modules/civicrm/CRM/ACL/BAO/ACL.php

-71
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
2828

2929
public static $_fieldKeys = NULL;
3030

31-
/**
32-
* Get ACL entity table.
33-
* @deprecated
34-
* @return array|null
35-
*/
36-
public static function entityTable() {
37-
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
38-
if (!self::$_entityTable) {
39-
self::$_entityTable = [
40-
'civicrm_contact' => ts('Contact'),
41-
'civicrm_acl_role' => ts('ACL Role'),
42-
];
43-
}
44-
return self::$_entityTable;
45-
}
46-
47-
/**
48-
* @return array|null
49-
* @deprecated
50-
*/
51-
public static function objectTable() {
52-
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
53-
if (!self::$_objectTable) {
54-
self::$_objectTable = [
55-
'civicrm_contact' => ts('Contact'),
56-
'civicrm_group' => ts('Group'),
57-
'civicrm_saved_search' => ts('Contact Group'),
58-
'civicrm_admin' => ts('Import'),
59-
];
60-
}
61-
return self::$_objectTable;
62-
}
63-
6431
/**
6532
* Available operations for pseudoconstant.
6633
*
@@ -80,44 +47,6 @@ public static function operation() {
8047
return self::$_operation;
8148
}
8249

83-
/**
84-
* Given a table and id pair, return the filter clause
85-
*
86-
* @param string $table
87-
* The table owning the object.
88-
* @param int $id
89-
* The ID of the object.
90-
* @param array $tables
91-
* Tables that will be needed in the FROM.
92-
* @deprecated
93-
*
94-
* @return string|null
95-
* WHERE-style clause to filter results,
96-
* or null if $table or $id is null
97-
*
98-
* @throws \CRM_Core_Exception
99-
*/
100-
public static function getClause($table, $id, &$tables) {
101-
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
102-
$table = CRM_Utils_Type::escape($table, 'String');
103-
$id = CRM_Utils_Type::escape($id, 'Integer');
104-
$whereTables = [];
105-
106-
$ssTable = CRM_Contact_BAO_SavedSearch::getTableName();
107-
108-
if (empty($table)) {
109-
return NULL;
110-
}
111-
elseif ($table == $ssTable) {
112-
return CRM_Contact_BAO_SavedSearch::whereClause($id, $tables, $whereTables);
113-
}
114-
elseif (!empty($id)) {
115-
$tables[$table] = TRUE;
116-
return "$table.id = $id";
117-
}
118-
return NULL;
119-
}
120-
12150
/**
12251
* Construct an associative array of an ACL rule's properties
12352
*

profiles/civicrm_starterkit/modules/civicrm/CRM/ACL/Form/WordPress/Permissions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function postProcess() {
135135
}
136136

137137
//Add the selected wordpress capabilities for the role
138-
$rolePermissions = $params[$role];
138+
$rolePermissions = $params[$role] ?? [];
139139
if (!empty($rolePermissions)) {
140140
foreach ($rolePermissions as $key => $capability) {
141141
$roleObj->add_cap($key);

profiles/civicrm_starterkit/modules/civicrm/CRM/Activity/BAO/Activity.php

+53-70
Original file line numberDiff line numberDiff line change
@@ -1783,16 +1783,14 @@ public static function addActivity(
17831783
* particular component object.
17841784
*
17851785
* @return string
1786+
* @throws \CRM_Core_Exception
17861787
*/
17871788
public static function getActivitySubject($entityObj) {
1789+
// @todo determine the subject on the appropriate entity rather than from the activity.
17881790
switch ($entityObj->__table) {
17891791
case 'civicrm_membership':
1790-
$membershipType = CRM_Member_PseudoConstant::membershipType($entityObj->membership_type_id);
1791-
$subject = $membershipType ? $membershipType : ts('Membership');
1792-
1793-
if (is_array($subject)) {
1794-
$subject = implode(", ", $subject);
1795-
}
1792+
$membershipType = CRM_Core_PseudoConstant::getLabel('CRM_Member_BAO_Membership', 'membership_type_id', $entityObj->membership_type_id);
1793+
$subject = $membershipType ?: ts('Membership');
17961794

17971795
if (!CRM_Utils_System::isNull($entityObj->source)) {
17981796
$subject .= " - {$entityObj->source}";
@@ -1803,7 +1801,7 @@ public static function getActivitySubject($entityObj) {
18031801
$subject .= sprintf(' (by %s)', $displayName);
18041802
}
18051803

1806-
$subject .= " - Status: " . CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipStatus', $entityObj->status_id, 'label');
1804+
$subject .= ' - Status: ' . CRM_Core_PseudoConstant::getLabel('CRM_Member_BAO_Membership', 'status_id', $entityObj->status_id);
18071805
return $subject;
18081806

18091807
case 'civicrm_participant':
@@ -2132,91 +2130,75 @@ public static function exportableFields($name = 'Activity') {
21322130
self::$_exportableFields[$name] = [];
21332131

21342132
// TODO: ideally we should retrieve all fields from xml, in this case since activity processing is done
2135-
// my case hence we have defined fields as case_*
2136-
if ($name === 'Activity') {
2137-
$exportableFields = CRM_Activity_DAO_Activity::export();
2138-
$exportableFields['source_contact_id'] = [
2139-
'title' => ts('Source Contact ID'),
2140-
'type' => CRM_Utils_Type::T_INT,
2141-
];
2142-
$exportableFields['source_contact'] = [
2143-
'title' => ts('Source Contact'),
2133+
$exportableFields = CRM_Activity_DAO_Activity::export();
2134+
$exportableFields['source_contact_id'] = [
2135+
'title' => ts('Source Contact ID'),
2136+
'type' => CRM_Utils_Type::T_INT,
2137+
];
2138+
$exportableFields['source_contact'] = [
2139+
'title' => ts('Source Contact'),
2140+
'type' => CRM_Utils_Type::T_STRING,
2141+
];
2142+
2143+
// @todo - remove these - they are added by CRM_Core_DAO::appendPseudoConstantsToFields
2144+
// below. That search label stuff is referenced in search builder but is likely just
2145+
// a hack that duplicates, maybe differently, other functionality.
2146+
$activityFields = [
2147+
'activity_type' => [
2148+
'title' => ts('Activity Type'),
2149+
'name' => 'activity_type',
21442150
'type' => CRM_Utils_Type::T_STRING,
2145-
];
2151+
'searchByLabel' => TRUE,
2152+
],
2153+
'activity_status' => [
2154+
'title' => ts('Activity Status'),
2155+
'name' => 'activity_status',
2156+
'type' => CRM_Utils_Type::T_STRING,
2157+
'searchByLabel' => TRUE,
2158+
],
2159+
'activity_priority' => [
2160+
'title' => ts('Activity Priority'),
2161+
'name' => 'activity_priority',
2162+
'type' => CRM_Utils_Type::T_STRING,
2163+
'searchByLabel' => TRUE,
2164+
],
2165+
];
2166+
$fields = array_merge($activityFields, $exportableFields);
2167+
$fields['activity_type_id']['title'] = ts('Activity Type ID');
2168+
$fields['activity_priority_id'] = $fields['priority_id'];
21462169

2147-
// @todo - remove these - they are added by CRM_Core_DAO::appendPseudoConstantsToFields
2148-
// below. That search label stuff is referenced in search builder but is likely just
2149-
// a hack that duplicates, maybe differently, other functionality.
2150-
$Activityfields = [
2151-
'activity_type' => [
2152-
'title' => ts('Activity Type'),
2153-
'name' => 'activity_type',
2154-
'type' => CRM_Utils_Type::T_STRING,
2155-
'searchByLabel' => TRUE,
2156-
],
2157-
'activity_status' => [
2158-
'title' => ts('Activity Status'),
2159-
'name' => 'activity_status',
2160-
'type' => CRM_Utils_Type::T_STRING,
2161-
'searchByLabel' => TRUE,
2162-
],
2163-
'activity_priority' => [
2164-
'title' => ts('Activity Priority'),
2165-
'name' => 'activity_priority',
2166-
'type' => CRM_Utils_Type::T_STRING,
2167-
'searchByLabel' => TRUE,
2168-
],
2169-
];
2170-
$fields = array_merge($Activityfields, $exportableFields);
2171-
$fields['activity_type_id']['title'] = ts('Activity Type ID');
2172-
}
2173-
else {
2170+
if ($name === 'Case') {
2171+
// Now add "case_activity" fields
21742172
// Set title to activity fields.
2175-
$fields = [
2176-
'case_activity_subject' => [
2177-
'title' => ts('Activity Subject'),
2178-
'type' => CRM_Utils_Type::T_STRING,
2179-
],
2173+
$caseActivityFields = [
21802174
'case_source_contact_id' => [
21812175
'title' => ts('Activity Reporter'),
21822176
'type' => CRM_Utils_Type::T_STRING,
21832177
],
2184-
'case_recent_activity_date' => [
2185-
'title' => ts('Activity Actual Date'),
2178+
'case_activity_date_time' => [
2179+
'title' => ts('Activity Date'),
21862180
'type' => CRM_Utils_Type::T_DATE,
21872181
],
2188-
'case_scheduled_activity_date' => [
2189-
'title' => ts('Activity Scheduled Date'),
2190-
'type' => CRM_Utils_Type::T_DATE,
2191-
],
2192-
'case_recent_activity_type' => [
2182+
'case_activity_type' => [
21932183
'title' => ts('Activity Type'),
21942184
'type' => CRM_Utils_Type::T_STRING,
21952185
],
2196-
'case_activity_status' => [
2197-
'title' => ts('Activity Status'),
2198-
'type' => CRM_Utils_Type::T_STRING,
2199-
],
2200-
'case_activity_duration' => [
2201-
'title' => ts('Activity Duration'),
2202-
'type' => CRM_Utils_Type::T_INT,
2203-
],
22042186
'case_activity_medium_id' => [
22052187
'title' => ts('Activity Medium'),
22062188
'type' => CRM_Utils_Type::T_INT,
22072189
],
2208-
'case_activity_details' => [
2209-
'title' => ts('Activity Details'),
2210-
'type' => CRM_Utils_Type::T_TEXT,
2211-
],
22122190
'case_activity_is_auto' => [
22132191
'title' => ts('Activity Auto-generated?'),
22142192
'type' => CRM_Utils_Type::T_BOOLEAN,
22152193
],
22162194
];
2195+
$caseStandardFields = ['activity_subject', 'activity_status', 'activity_duration', 'activity_details'];
2196+
foreach ($caseStandardFields as $key) {
2197+
$caseActivityFields['case_' . $key] = $fields[$key];
2198+
}
2199+
$fields = $caseActivityFields;
22172200
}
2218-
2219-
// add custom data for case activities
2201+
// Add custom data
22202202
$fields = array_merge($fields, CRM_Core_BAO_CustomField::getFieldsForImport('Activity'));
22212203
CRM_Core_DAO::appendPseudoConstantsToFields($fields);
22222204
self::$_exportableFields[$name] = $fields;
@@ -2455,6 +2437,7 @@ protected static function getPermittedActivityTypes() {
24552437
foreach ($types as $type) {
24562438
$permittedActivityTypes[$type['activity_type_id']] = (int) $type['activity_type_id'];
24572439
}
2440+
asort($permittedActivityTypes);
24582441
Civi::$statics[__CLASS__]['permitted_activity_types'][$userID] = $permittedActivityTypes;
24592442
}
24602443
return Civi::$statics[__CLASS__]['permitted_activity_types'][$userID];

profiles/civicrm_starterkit/modules/civicrm/CRM/Activity/BAO/Query.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public static function whereClauseSingle(&$values, &$query) {
272272
$val = explode(',', $val);
273273
foreach ($val as $tId) {
274274
if (is_numeric($tId)) {
275-
$value[$tId] = 1;
275+
$value[] = $tId;
276276
}
277277
}
278278
}

profiles/civicrm_starterkit/modules/civicrm/CRM/Activity/Form/Search.php

-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ public function postProcess() {
182182
$this->_formValues["activity_test"] = 0;
183183
}
184184

185-
CRM_Core_BAO_CustomValue::fixCustomFieldValue($this->_formValues);
186-
187185
$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);
188186

189187
$this->set('queryParams', $this->_queryParams);

profiles/civicrm_starterkit/modules/civicrm/CRM/Activity/Import/Form/DataSource.php

+5-14
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,11 @@ public function buildQuickForm() {
3131
parent::buildQuickForm();
3232

3333
// FIXME: This 'onDuplicate' form element is never used -- copy/paste error?
34-
$duplicateOptions = [];
35-
$duplicateOptions[] = $this->createElement('radio',
36-
NULL, NULL, ts('Skip'), CRM_Import_Parser::DUPLICATE_SKIP
37-
);
38-
$duplicateOptions[] = $this->createElement('radio',
39-
NULL, NULL, ts('Update'), CRM_Import_Parser::DUPLICATE_UPDATE
40-
);
41-
$duplicateOptions[] = $this->createElement('radio',
42-
NULL, NULL, ts('Fill'), CRM_Import_Parser::DUPLICATE_FILL
43-
);
44-
45-
$this->addGroup($duplicateOptions, 'onDuplicate',
46-
ts('On duplicate entries')
47-
);
34+
$this->addRadio('onDuplicate', ts('On duplicate entries'), [
35+
CRM_Import_Parser::DUPLICATE_SKIP => ts('Skip'),
36+
CRM_Import_Parser::DUPLICATE_UPDATE => ts('Update'),
37+
CRM_Import_Parser::DUPLICATE_FILL => ts('Fill'),
38+
]);
4839
}
4940

5041
/**

0 commit comments

Comments
 (0)