Skip to content

Commit

Permalink
Bug: 14280 Honor the alternative_name mapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Mar 7, 2016
1 parent a0851e6 commit 070ce57
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion turba/lib/Driver.php
Expand Up @@ -642,7 +642,11 @@ public function search(array $search_criteria, $sort_order = null,
$return_fields[] = 'emails';
}
if (count($return_fields)) {
$return_fields_pre = array_unique(array_merge(array('__key', '__type', '__owner', '__members', 'name'), $return_fields));
$default_fields = array('__key', '__type', '__owner', '__members', 'name');
if ($this->alternativeName) {
$default_fields[] = $this->alternativeName;
}
$return_fields_pre = array_unique(array_merge($default_fields, $return_fields));
$return_fields = array();
foreach ($return_fields_pre as $field) {
$result = $this->toDriver($field);
Expand Down

0 comments on commit 070ce57

Please sign in to comment.