View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000699 | OXID eShop (all versions) | 1. ----- eShop frontend ----- | public | 2009-03-12 19:04 | 2012-12-10 14:38 |
Reporter | berhart | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.0.1.0 revision 15990 | ||||
Fixed in Version | 4.1.0 revision 17976 | ||||
Summary | 0000699: Icon name creation not working properly for images having uppercase extension | ||||
Description | oxUtilsPic->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 ); } | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | 5.2.6 | ||||
Database Version | 5.0.33 | ||||
|
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. |
|
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. |
|
This should work even better: return preg_replace( '/(.*)\.(.*?)$/i', '$1_ico.$2', $sFilename ); :-) |