Commit bd009d4b authored by Richard Mansfield's avatar Richard Mansfield

Use profileiconbyid for user icons on copy a view page

Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent ecc7eb46
......@@ -2683,7 +2683,7 @@ class View {
}
if (!empty($owners)) {
$owners = get_records_select_assoc('usr', 'id IN (' . join(',', $owners) . ')', null, '',
'id,username,firstname,lastname,preferredname,admin,staff,studentid');
'id,username,firstname,lastname,preferredname,admin,staff,studentid,email,profileicon');
}
if (!empty($groups)) {
$groups = get_records_select_assoc('group', 'id IN (' . join(',', $groups) . ')', null, '', 'id,name');
......@@ -2696,6 +2696,7 @@ class View {
$v->shortdescription = str_shorten_html(str_replace('<br />', ' ', $v->description), 100, true);
if ($v->owner) {
$v->sharedby = View::owner_name($v->ownerformat, $owners[$v->owner]);
$v->user = $owners[$v->owner];
} else if ($v->group) {
$v->sharedby = $groups[$v->group]->name;
} else if ($v->institution) {
......
......@@ -19,7 +19,7 @@
<td><a class="grouplink" href="{$WWWROOT}group/view.php?id={$row.group}" target="_blank">{$row.sharedby}</a></td>
{elseif $row.owner}
<td>
<img src="{$WWWROOT}thumb.php?type=profileicon&maxwidth=20&maxheight=20&id={$row.owner}" />
<img src="{profile_icon_url user=$row.user maxwidth=20 maxheight=20}" alt="">
<a class="userlink" href="{$WWWROOT}user/view.php?id={$row.owner}" target="_blank">{$row.sharedby}</a>
</td>
{else}
......
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