Skip to content

Commit

Permalink
Update for 5.72 deprecation of getBriefName
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed May 8, 2024
1 parent 109635e commit bf14144
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions CRM/Extendedreport/Form/Report/ExtendedReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class CRM_Extendedreport_Form_Report_ExtendedReport extends CRM_Report_Form {

protected $_rollup = '';

protected $_fieldSpecs = [];

protected $contactIDField;

protected $metaData = [];
Expand Down Expand Up @@ -73,8 +71,6 @@ class CRM_Extendedreport_Form_Report_ExtendedReport extends CRM_Report_Form {
*/
protected $joinFiltersTab = FALSE;

protected $_customFields = [];

/**
* Array of tables with their statuses - relevant for things like Batch which might be absent from a DB.
*
Expand Down Expand Up @@ -2869,6 +2865,7 @@ protected function formatCustomValues($value, $customField, $fieldValueMap, arra
* @param string $tableName Name of table
*
* @return bool
* @throws \Civi\Core\Exception\DBQueryException
*/
protected function tableExists(string $tableName): bool {
$sql = "SHOW TABLES LIKE '$tableName'";
Expand Down Expand Up @@ -3750,6 +3747,7 @@ protected function getMembershipTypeColumns(array $options): array {
* - taken from core event class.
*
* @return array
* @throws \Civi\Core\Exception\DBQueryException
*/
protected function getEventFilterOptions(): array {
$events = [];
Expand Down Expand Up @@ -3990,7 +3988,7 @@ protected function getCampaignColumns(): array {
*
* This is called by getColumns.
*
* @param array
* @param array $options
*
* @return array
*
Expand Down Expand Up @@ -7292,7 +7290,7 @@ protected function getMetadataForFields(array $table): array {
return [];
}

$entity = CRM_Core_DAO_AllCoreTables::getBriefName(str_replace('BAO', 'DAO', $daoOrBaoName));
$entity = CRM_Core_DAO_AllCoreTables::getEntityNameForClass(str_replace('BAO', 'DAO', $daoOrBaoName));
if ($entity) {
$expFields = civicrm_api3($entity, 'getfields', [])['values'];
}
Expand Down Expand Up @@ -7759,7 +7757,7 @@ protected function getCustomDataDAOs(array $extends): array {
}
}
foreach ($this->_columns as $spec) {
$entityName = (isset($spec['bao']) ? CRM_Core_DAO_AllCoreTables::getBriefName(str_replace('BAO', 'DAO', $spec['bao'])) : '');
$entityName = (isset($spec['bao']) ? CRM_Core_DAO_AllCoreTables::getEntityNameForClass(str_replace('BAO', 'DAO', $spec['bao'])) : '');
if ($entityName && !empty($extendsEntities[$entityName])) {
$extendsMap[$entityName][$spec['prefix']] = $spec['prefix_label'];
}
Expand Down
6 changes: 3 additions & 3 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<author>Eileen McNaughton</author>
<email>[email protected]</email>
</maintainer>
<releaseDate>2024-02-10</releaseDate>
<version>6.0.0</version>
<releaseDate>2024-05-09</releaseDate>
<version>6.0.1</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.69</ver>
<ver>5.72</ver>
</compatibility>
<comments>Extended reports create other report options such as crosstab urls, multiple contact custom fields, price
set reports
Expand Down

0 comments on commit bf14144

Please sign in to comment.