aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/pages/start.php4
-rw-r--r--views/default/icon/default.php5
2 files changed, 8 insertions, 1 deletions
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 4b230a93d..834e98870 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -189,10 +189,12 @@ function pages_icon_url_override($hook, $type, $returnvalue, $params) {
if (elgg_instanceof($entity, 'object', 'page_top') ||
elgg_instanceof($entity, 'object', 'page')) {
switch ($params['size']) {
+ case 'topbar':
+ case 'tiny':
case 'small':
return 'mod/pages/images/pages.gif';
break;
- case 'medium':
+ default:
return 'mod/pages/images/pages_lrg.gif';
break;
}
diff --git a/views/default/icon/default.php b/views/default/icon/default.php
index 22c20b3a7..087c7eae9 100644
--- a/views/default/icon/default.php
+++ b/views/default/icon/default.php
@@ -34,10 +34,15 @@ if (isset($vars['href'])) {
$url = $vars['href'];
}
+$icon_sizes = elgg_get_config('icon_sizes');
+$size = $vars['size'];
+
$img = elgg_view('output/img', array(
'src' => $entity->getIconURL($vars['size']),
'alt' => $title,
'class' => $class,
+ 'width' => $size != 'master' ? $icon_sizes[$size]['w'] : NULL,
+ 'height' => $size != 'master' ? $icon_sizes[$size]['h'] : NULL,
));
if ($url) {