View Issue Details

IDProjectCategoryView StatusLast Update
0000699OXID eShop (all versions)1. ----- eShop frontend -----public2012-12-10 14:38
Reporterberhart Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.0.1.0 revision 15990 
Fixed in Version4.1.0 revision 17976 
Summary0000699: Icon name creation not working properly for images having uppercase extension
DescriptionoxUtilsPic->iconName() returns name without _ico extension when image filenames have uppercase file extension. Result: Image icons in product preview are waaay to big, because normal image is used instead of icon image.

Possible solution:

Replace

    public function iconName( $sFilename )
    {
        $sIconName = str_replace(".jpg", "_ico.jpg", $sFilename );
        $sIconName = str_replace(".gif", "_ico.gif", $sIconName );
        $sIconName = str_replace(".png", "_ico.png", $sIconName );

        return $sIconName;
    }


with

    public function iconName( $sFilename )
    {
        return eregi_replace( '\.(.*)$', '_ico.\\1', $sFilename );
    }


TagsNo tags attached.
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

dainius.bigelis

2009-03-13 10:36

reporter   ~0000565

Cannot reproduce such case (for me icons are displayed in correct size).
@Developers: please check from the source code side, if such issue is possible and fix if needed.

berhart

2009-03-13 12:46

reporter   ~0000568

You probably can't reproduce, because the admin interface lowercases all image filenames when added to a product.

So this only shows, when products are added via direct database import.

berhart

2009-03-18 16:47

reporter   ~0000595

This should work even better:

return preg_replace( '/(.*)\.(.*?)$/i', '$1_ico.$2', $sFilename );

:-)