Skip to content
Snippets Groups Projects
Commit 70c5cd97 authored by colemanw's avatar colemanw
Browse files

Pseudoconstant - always explicitly name abbrColumn

Stop the overly-clever guesswork of abbrColumn so that
it can always be know if a pseudoconstant has an abbreviation.
parent e8a784a3
Branches
Tags
No related merge requests found
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/Address.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:bd0caca7da12cba4ed8161b892a77229)
* (GenCodeChecksum:40a96138e8081eaba0460889f49cc1cf)
*/
/**
......@@ -619,6 +619,7 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO {
'table' => 'civicrm_county',
'keyColumn' => 'id',
'labelColumn' => 'name',
'abbrColumn' => 'abbreviation',
],
'add' => '1.1',
],
......@@ -643,6 +644,7 @@ class CRM_Core_DAO_Address extends CRM_Core_DAO {
'table' => 'civicrm_state_province',
'keyColumn' => 'id',
'labelColumn' => 'name',
'abbrColumn' => 'abbreviation',
],
'add' => '1.1',
],
......
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/County.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:6666108a662d719144f390bf4746268d)
* (GenCodeChecksum:f54f7ff28a6ecde09252698c389db154)
*/
/**
......@@ -181,6 +181,7 @@ class CRM_Core_DAO_County extends CRM_Core_DAO {
'table' => 'civicrm_state_province',
'keyColumn' => 'id',
'labelColumn' => 'name',
'abbrColumn' => 'abbreviation',
],
'add' => '1.1',
],
......
......@@ -1513,8 +1513,8 @@ WHERE id = %1
}
// Use abbrColum if context is abbreviate
if ($context === 'abbreviate' && (in_array('abbreviation', $availableFields) || !empty($pseudoconstant['abbrColumn']))) {
$params['labelColumn'] = $pseudoconstant['abbrColumn'] ?? 'abbreviation';
if ($context === 'abbreviate' && !empty($pseudoconstant['abbrColumn'])) {
$params['labelColumn'] = $pseudoconstant['abbrColumn'];
}
// Condition param can be passed as an sql clause string or an array of clauses
......
......@@ -265,6 +265,7 @@
<table>civicrm_county</table>
<keyColumn>id</keyColumn>
<labelColumn>name</labelColumn>
<abbrColumn>abbreviation</abbrColumn>
</pseudoconstant>
<html>
<type>ChainSelect</type>
......@@ -292,6 +293,7 @@
<table>civicrm_state_province</table>
<keyColumn>id</keyColumn>
<labelColumn>name</labelColumn>
<abbrColumn>abbreviation</abbrColumn>
</pseudoconstant>
<localize_context>province</localize_context>
<html>
......
......@@ -54,6 +54,7 @@
<table>civicrm_state_province</table>
<keyColumn>id</keyColumn>
<labelColumn>name</labelColumn>
<abbrColumn>abbreviation</abbrColumn>
</pseudoconstant>
</field>
<foreignKey>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment