diff options
author | cash <cash.costello@gmail.com> | 2013-03-08 13:59:46 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2013-03-08 13:59:46 -0500 |
commit | d07700e172c37c7af64ba1be5032330ba9766cb0 (patch) | |
tree | a477db495aafce0f4c2fe4c5fa3a048569896ff2 /views/default/icon | |
parent | da25d56fa09aeb8ee21767e60b27d854505cd8cd (diff) | |
download | elgg-d07700e172c37c7af64ba1be5032330ba9766cb0.tar.gz elgg-d07700e172c37c7af64ba1be5032330ba9766cb0.tar.bz2 |
IE7 does not like empty img width/height
Diffstat (limited to 'views/default/icon')
-rw-r--r-- | views/default/icon/default.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/views/default/icon/default.php b/views/default/icon/default.php index 25175b0f4..7f13a1189 100644 --- a/views/default/icon/default.php +++ b/views/default/icon/default.php @@ -44,13 +44,24 @@ if (!isset($vars['height'])) { $vars['height'] = $size != 'master' ? $icon_sizes[$size]['h'] : null; } -$img = elgg_view('output/img', array( +$img_params = array( 'src' => $entity->getIconURL($vars['size']), - 'alt' => $title, - 'class' => $class, - 'width' => $vars['width'], - 'height' => $vars['height'], -)); + 'alt' => $title, +); + +if (!empty($class)) { + $img_params['class'] = $class; +} + +if (!empty($vars['width'])) { + $img_params['width'] = $vars['width']; +} + +if (!empty($vars['height'])) { + $img_params['height'] = $vars['height']; +} + +$img = elgg_view('output/img', $img_params); if ($url) { $params = array( |