aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2013-03-08 13:59:46 -0500
committercash <cash.costello@gmail.com>2013-03-08 13:59:46 -0500
commitd07700e172c37c7af64ba1be5032330ba9766cb0 (patch)
treea477db495aafce0f4c2fe4c5fa3a048569896ff2 /views
parentda25d56fa09aeb8ee21767e60b27d854505cd8cd (diff)
downloadelgg-d07700e172c37c7af64ba1be5032330ba9766cb0.tar.gz
elgg-d07700e172c37c7af64ba1be5032330ba9766cb0.tar.bz2
IE7 does not like empty img width/height
Diffstat (limited to 'views')
-rw-r--r--views/default/icon/default.php23
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(