Commit 4c99af9c authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1656078: Display description of introduction instead of title"

parents 2987e5a8 022c81b8
......@@ -930,14 +930,14 @@ function get_group_user_search_results($group, $query, $offset, $limit, $members
if ($results['count']) {
$userids = array_map(create_function('$a', 'return $a["id"];'), $results['data']);
$introductions = get_records_sql_assoc("SELECT \"owner\", title
$introductions = get_records_sql_assoc("SELECT \"owner\", description
FROM {artefact}
WHERE artefacttype = 'introduction'
AND \"owner\" IN (" . implode(',', db_array_to_ph($userids)) . ')',
$userids);
foreach ($results['data'] as &$result) {
$result['name'] = display_name($result);
$result['introduction'] = isset($introductions[$result['id']]) ? $introductions[$result['id']]->title : '';
$result['introduction'] = isset($introductions[$result['id']]) ? $introductions[$result['id']]->description : '';
if (isset($result['jointime'])) {
$result['jointime'] = format_date($result['jointime'], 'strftimedate');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment