]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #5058 not forcing a size on an image
authorcash <cash.costello@gmail.com>
Wed, 6 Mar 2013 22:56:19 +0000 (17:56 -0500)
committercash <cash.costello@gmail.com>
Wed, 6 Mar 2013 22:56:19 +0000 (17:56 -0500)
mod/groups/views/default/groups/css.php
mod/groups/views/default/groups/profile/summary.php
views/default/icon/default.php

index 39246f8563228b22dc73160f25be74e39b14582e..32dd2b74dff40396b4f84977ef871a198c249dc1 100644 (file)
@@ -9,10 +9,6 @@
 .groups-profile > .elgg-image {
        margin-right: 10px;
 }
-.groups-profile-icon img {
-       width: 100%;
-       height: auto;
-}
 .groups-stats {
        background: #eeeeee;
        padding: 5px;
index f1221f19a9f1bbbc17c568f7956c13f3f079ebb5..3f74968714edfbaba7caa481c09d23ecb2e76b80 100644 (file)
@@ -25,7 +25,14 @@ if (!$owner) {
 <div class="groups-profile clearfix elgg-image-block">
        <div class="elgg-image">
                <div class="groups-profile-icon">
-                       <?php echo elgg_view_entity_icon($group, 'large', array('href' => '')); ?>
+                       <?php
+                               // we don't force icons to be square so don't set width/height
+                               echo elgg_view_entity_icon($group, 'large', array(
+                                       'href' => '',
+                                       'width' => '',
+                                       'height' => '',
+                               )); 
+                       ?>
                </div>
                <div class="groups-stats">
                        <p>
index 087c7eae9cb61feb5e88637a7b9a55bbcd99b692..25175b0f4923641977362a3e5c0e72e356f42ee5 100644 (file)
@@ -37,12 +37,19 @@ if (isset($vars['href'])) {
 $icon_sizes = elgg_get_config('icon_sizes');
 $size = $vars['size'];
 
+if (!isset($vars['width'])) {
+       $vars['width'] = $size != 'master' ? $icon_sizes[$size]['w'] : null;
+}
+if (!isset($vars['height'])) {
+       $vars['height'] = $size != 'master' ? $icon_sizes[$size]['h'] : null;
+}
+
 $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,
+       'width' => $vars['width'],
+       'height' => $vars['height'],
 ));
 
 if ($url) {