Skip to content

Commit

Permalink
Upgrade to CiviCRM 5.29.1
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
herbdool committed Oct 6, 2020
1 parent c12e84a commit cef0716
Show file tree
Hide file tree
Showing 1,248 changed files with 12,494 additions and 24,561 deletions.
27 changes: 2 additions & 25 deletions profiles/civicrm_starterkit/civicrm_starterkit.make
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ projects[drupal][version] = "7.61"
; ====== CIVICRM RELATED =========

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

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

; === Installer ===

; Ensure the baseURL is correct in the installer in Pantheon.
libraries[civicrm][patch][installerbaseurl] = ./patches/installer-baseurl.patch

; Related to https://issues.civicrm.org/jira/browse/CRM-9683
libraries[civicrm][patch][2130213] = ./patches/ignore-timezone-on-install-47-2130213.patch

; Necessary if CiviCRM in profiles/*/modules/civicrm
; Define the path to the civicrm.settings.php file because CiviCRM is not in the expected location.
; Required for anything not doing a full bootstrap.
; https://www.drupal.org/node/1844558
libraries[civicrm][patch][1844558] = ./patches/settings_location-for-profiles.patch
; https://www.drupal.org/node/2063371
libraries[civicrm][patch][2063371] = ./patches/2063371-add-modulePath-var-4-4.patch

; Populate with Pantheon environment settings on install
; https://www.drupal.org/node/1978838
libraries[civicrm][patch][pre-populate-installer] = ./patches/pre-populate-installer.patch
; https://www.drupal.org/node/1849424
libraries[civicrm][patch][1849424-pass] = ./patches/pass-vars-in-install-link.patch

; Cached Symfony container
; This is a potential issue but not clear at the moment--like it will just rebuild the php file.
; If concerned can set it to skip caching the container. In civicrm.settings.php set:
; define('CIVICRM_CONTAINER_CACHE', 'never');

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

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

; === Modules ===

projects[captcha][subdir] = "contrib"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public static function groupPermission(
}

if (!$contactID) {
$contactID = CRM_Core_Session::singleton()->getLoggedInContactID();
$contactID = CRM_Core_Session::getLoggedInContactID();
}

$key = "{$tableName}_{$type}_{$contactID}";
Expand Down
71 changes: 0 additions & 71 deletions profiles/civicrm_starterkit/modules/civicrm/CRM/ACL/BAO/ACL.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {

public static $_fieldKeys = NULL;

/**
* Get ACL entity table.
* @deprecated
* @return array|null
*/
public static function entityTable() {
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
if (!self::$_entityTable) {
self::$_entityTable = [
'civicrm_contact' => ts('Contact'),
'civicrm_acl_role' => ts('ACL Role'),
];
}
return self::$_entityTable;
}

/**
* @return array|null
* @deprecated
*/
public static function objectTable() {
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
if (!self::$_objectTable) {
self::$_objectTable = [
'civicrm_contact' => ts('Contact'),
'civicrm_group' => ts('Group'),
'civicrm_saved_search' => ts('Contact Group'),
'civicrm_admin' => ts('Import'),
];
}
return self::$_objectTable;
}

/**
* Available operations for pseudoconstant.
*
Expand All @@ -80,44 +47,6 @@ public static function operation() {
return self::$_operation;
}

/**
* Given a table and id pair, return the filter clause
*
* @param string $table
* The table owning the object.
* @param int $id
* The ID of the object.
* @param array $tables
* Tables that will be needed in the FROM.
* @deprecated
*
* @return string|null
* WHERE-style clause to filter results,
* or null if $table or $id is null
*
* @throws \CRM_Core_Exception
*/
public static function getClause($table, $id, &$tables) {
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
$table = CRM_Utils_Type::escape($table, 'String');
$id = CRM_Utils_Type::escape($id, 'Integer');
$whereTables = [];

$ssTable = CRM_Contact_BAO_SavedSearch::getTableName();

if (empty($table)) {
return NULL;
}
elseif ($table == $ssTable) {
return CRM_Contact_BAO_SavedSearch::whereClause($id, $tables, $whereTables);
}
elseif (!empty($id)) {
$tables[$table] = TRUE;
return "$table.id = $id";
}
return NULL;
}

/**
* Construct an associative array of an ACL rule's properties
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function postProcess() {
}

//Add the selected wordpress capabilities for the role
$rolePermissions = $params[$role];
$rolePermissions = $params[$role] ?? [];
if (!empty($rolePermissions)) {
foreach ($rolePermissions as $key => $capability) {
$roleObj->add_cap($key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1783,16 +1783,14 @@ public static function addActivity(
* particular component object.
*
* @return string
* @throws \CRM_Core_Exception
*/
public static function getActivitySubject($entityObj) {
// @todo determine the subject on the appropriate entity rather than from the activity.
switch ($entityObj->__table) {
case 'civicrm_membership':
$membershipType = CRM_Member_PseudoConstant::membershipType($entityObj->membership_type_id);
$subject = $membershipType ? $membershipType : ts('Membership');

if (is_array($subject)) {
$subject = implode(", ", $subject);
}
$membershipType = CRM_Core_PseudoConstant::getLabel('CRM_Member_BAO_Membership', 'membership_type_id', $entityObj->membership_type_id);
$subject = $membershipType ?: ts('Membership');

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

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

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

// TODO: ideally we should retrieve all fields from xml, in this case since activity processing is done
// my case hence we have defined fields as case_*
if ($name === 'Activity') {
$exportableFields = CRM_Activity_DAO_Activity::export();
$exportableFields['source_contact_id'] = [
'title' => ts('Source Contact ID'),
'type' => CRM_Utils_Type::T_INT,
];
$exportableFields['source_contact'] = [
'title' => ts('Source Contact'),
$exportableFields = CRM_Activity_DAO_Activity::export();
$exportableFields['source_contact_id'] = [
'title' => ts('Source Contact ID'),
'type' => CRM_Utils_Type::T_INT,
];
$exportableFields['source_contact'] = [
'title' => ts('Source Contact'),
'type' => CRM_Utils_Type::T_STRING,
];

// @todo - remove these - they are added by CRM_Core_DAO::appendPseudoConstantsToFields
// below. That search label stuff is referenced in search builder but is likely just
// a hack that duplicates, maybe differently, other functionality.
$activityFields = [
'activity_type' => [
'title' => ts('Activity Type'),
'name' => 'activity_type',
'type' => CRM_Utils_Type::T_STRING,
];
'searchByLabel' => TRUE,
],
'activity_status' => [
'title' => ts('Activity Status'),
'name' => 'activity_status',
'type' => CRM_Utils_Type::T_STRING,
'searchByLabel' => TRUE,
],
'activity_priority' => [
'title' => ts('Activity Priority'),
'name' => 'activity_priority',
'type' => CRM_Utils_Type::T_STRING,
'searchByLabel' => TRUE,
],
];
$fields = array_merge($activityFields, $exportableFields);
$fields['activity_type_id']['title'] = ts('Activity Type ID');
$fields['activity_priority_id'] = $fields['priority_id'];

// @todo - remove these - they are added by CRM_Core_DAO::appendPseudoConstantsToFields
// below. That search label stuff is referenced in search builder but is likely just
// a hack that duplicates, maybe differently, other functionality.
$Activityfields = [
'activity_type' => [
'title' => ts('Activity Type'),
'name' => 'activity_type',
'type' => CRM_Utils_Type::T_STRING,
'searchByLabel' => TRUE,
],
'activity_status' => [
'title' => ts('Activity Status'),
'name' => 'activity_status',
'type' => CRM_Utils_Type::T_STRING,
'searchByLabel' => TRUE,
],
'activity_priority' => [
'title' => ts('Activity Priority'),
'name' => 'activity_priority',
'type' => CRM_Utils_Type::T_STRING,
'searchByLabel' => TRUE,
],
];
$fields = array_merge($Activityfields, $exportableFields);
$fields['activity_type_id']['title'] = ts('Activity Type ID');
}
else {
if ($name === 'Case') {
// Now add "case_activity" fields
// Set title to activity fields.
$fields = [
'case_activity_subject' => [
'title' => ts('Activity Subject'),
'type' => CRM_Utils_Type::T_STRING,
],
$caseActivityFields = [
'case_source_contact_id' => [
'title' => ts('Activity Reporter'),
'type' => CRM_Utils_Type::T_STRING,
],
'case_recent_activity_date' => [
'title' => ts('Activity Actual Date'),
'case_activity_date_time' => [
'title' => ts('Activity Date'),
'type' => CRM_Utils_Type::T_DATE,
],
'case_scheduled_activity_date' => [
'title' => ts('Activity Scheduled Date'),
'type' => CRM_Utils_Type::T_DATE,
],
'case_recent_activity_type' => [
'case_activity_type' => [
'title' => ts('Activity Type'),
'type' => CRM_Utils_Type::T_STRING,
],
'case_activity_status' => [
'title' => ts('Activity Status'),
'type' => CRM_Utils_Type::T_STRING,
],
'case_activity_duration' => [
'title' => ts('Activity Duration'),
'type' => CRM_Utils_Type::T_INT,
],
'case_activity_medium_id' => [
'title' => ts('Activity Medium'),
'type' => CRM_Utils_Type::T_INT,
],
'case_activity_details' => [
'title' => ts('Activity Details'),
'type' => CRM_Utils_Type::T_TEXT,
],
'case_activity_is_auto' => [
'title' => ts('Activity Auto-generated?'),
'type' => CRM_Utils_Type::T_BOOLEAN,
],
];
$caseStandardFields = ['activity_subject', 'activity_status', 'activity_duration', 'activity_details'];
foreach ($caseStandardFields as $key) {
$caseActivityFields['case_' . $key] = $fields[$key];
}
$fields = $caseActivityFields;
}

// add custom data for case activities
// Add custom data
$fields = array_merge($fields, CRM_Core_BAO_CustomField::getFieldsForImport('Activity'));
CRM_Core_DAO::appendPseudoConstantsToFields($fields);
self::$_exportableFields[$name] = $fields;
Expand Down Expand Up @@ -2455,6 +2437,7 @@ protected static function getPermittedActivityTypes() {
foreach ($types as $type) {
$permittedActivityTypes[$type['activity_type_id']] = (int) $type['activity_type_id'];
}
asort($permittedActivityTypes);
Civi::$statics[__CLASS__]['permitted_activity_types'][$userID] = $permittedActivityTypes;
}
return Civi::$statics[__CLASS__]['permitted_activity_types'][$userID];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public static function whereClauseSingle(&$values, &$query) {
$val = explode(',', $val);
foreach ($val as $tId) {
if (is_numeric($tId)) {
$value[$tId] = 1;
$value[] = $tId;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ public function postProcess() {
$this->_formValues["activity_test"] = 0;
}

CRM_Core_BAO_CustomValue::fixCustomFieldValue($this->_formValues);

$this->_queryParams = CRM_Contact_BAO_Query::convertFormValues($this->_formValues);

$this->set('queryParams', $this->_queryParams);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,11 @@ public function buildQuickForm() {
parent::buildQuickForm();

// FIXME: This 'onDuplicate' form element is never used -- copy/paste error?
$duplicateOptions = [];
$duplicateOptions[] = $this->createElement('radio',
NULL, NULL, ts('Skip'), CRM_Import_Parser::DUPLICATE_SKIP
);
$duplicateOptions[] = $this->createElement('radio',
NULL, NULL, ts('Update'), CRM_Import_Parser::DUPLICATE_UPDATE
);
$duplicateOptions[] = $this->createElement('radio',
NULL, NULL, ts('Fill'), CRM_Import_Parser::DUPLICATE_FILL
);

$this->addGroup($duplicateOptions, 'onDuplicate',
ts('On duplicate entries')
);
$this->addRadio('onDuplicate', ts('On duplicate entries'), [
CRM_Import_Parser::DUPLICATE_SKIP => ts('Skip'),
CRM_Import_Parser::DUPLICATE_UPDATE => ts('Update'),
CRM_Import_Parser::DUPLICATE_FILL => ts('Fill'),
]);
}

/**
Expand Down
Loading

0 comments on commit cef0716

Please sign in to comment.