projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b1f2aa
)
Sort address tokens into an optgroup
author
Coleman Watts
<coleman@civicrm.org>
Wed, 27 Aug 2014 13:01:40 +0000
(14:01 +0100)
committer
Coleman Watts
<coleman@civicrm.org>
Wed, 27 Aug 2014 13:01:40 +0000
(14:01 +0100)
CRM/Utils/Token.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Utils/Token.php
b/CRM/Utils/Token.php
index 12e21758e27056f244eb86d934f8d5b72117b5e7..0e58f6e12dda537c21e573e3adcbd9fa682a9dd5 100644
(file)
--- a/
CRM/Utils/Token.php
+++ b/
CRM/Utils/Token.php
@@
-1720,7
+1720,12
@@
class CRM_Utils_Token {
// Group by entity
else {
$split = explode('.', trim($k, '{}'));
- $entity = isset($split[1]) ? ucfirst($split[0]) : 'Contact';
+ if (isset($split[1])) {
+ $entity = array_key_exists($split[1], CRM_Core_DAO_Address::export()) ? 'Address' : ucfirst($split[0]);
+ }
+ else {
+ $entity = 'Contact';
+ }
$sorted[ts($entity)][] = array('id' => $k, 'text' => $v);
}
}