diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-13 16:22:57 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-16 19:53:04 -0500 |
commit | 5ae9e93b57bdc6744198538153b84bed4a34e960 (patch) | |
tree | d8314be7c594087d69ef0dcb716ab1255323a758 /views/default/icon | |
parent | c75ee6f8807e34d3d9c4c941e6d0e656a5b1b9b3 (diff) | |
download | elgg-5ae9e93b57bdc6744198538153b84bed4a34e960.tar.gz elgg-5ae9e93b57bdc6744198538153b84bed4a34e960.tar.bz2 |
Fixes #4082 adds output/img
Diffstat (limited to 'views/default/icon')
-rw-r--r-- | views/default/icon/default.php | 7 | ||||
-rw-r--r-- | views/default/icon/user/default.php | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/views/default/icon/default.php b/views/default/icon/default.php index ec39e59f2..22c20b3a7 100644 --- a/views/default/icon/default.php +++ b/views/default/icon/default.php @@ -34,8 +34,11 @@ if (isset($vars['href'])) { $url = $vars['href']; } -$img_src = $entity->getIconURL($vars['size']); -$img = "<img $class src=\"$img_src\" alt=\"$title\" />"; +$img = elgg_view('output/img', array( + 'src' => $entity->getIconURL($vars['size']), + 'alt' => $title, + 'class' => $class, +)); if ($url) { $params = array( diff --git a/views/default/icon/user/default.php b/views/default/icon/user/default.php index a208ec41a..c0b0e7483 100644 --- a/views/default/icon/user/default.php +++ b/views/default/icon/user/default.php @@ -47,7 +47,7 @@ if ($js) { $img_class = ''; if (isset($vars['img_class'])) { - $img_class = "class=\"{$vars['img_class']}\""; + $img_class = $vars['img_class']; } $use_hover = elgg_extract('use_hover', $vars, true); @@ -62,8 +62,14 @@ if (isset($vars['hover'])) { $spacer_url = elgg_get_site_url() . '_graphics/spacer.gif'; -$icon_url = $user->getIconURL($size); -$icon = "<img src=\"$spacer_url\" alt=\"$name\" title=\"$name\" $img_class $js style=\"background: url($icon_url) no-repeat;\" />"; +$icon_url = elgg_format_url($user->getIconURL($size)); +$icon = elgg_view('output/img', array( + 'src' => $spacer_url, + 'alt' => $name, + 'title' => $name, + 'class' => $img_class, + 'style' => "background: url($icon_url) no-repeat;", +)); $show_menu = $use_hover && (elgg_is_admin_logged_in() || !$user->isBanned()); |