View Issue Details

IDProjectCategoryView StatusLast Update
0003345OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2012-12-07 14:13
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version4.6.0_beta3 
Summary0003345: Pictures aren't deleted
DescriptionWhenever I delete assigned picture to category (could be picture , icon, or promo), it isn't actually physically deleted , though it makes an attempt,
see oxutils.php overwritePic().
Something wrong is with - $sImgDir = $sAbsDynImageDir . $sPicDir;
Steps To ReproduceGo to Administer Products -> Categories -> Main;
Upload icon picture.
Delete it by pressing X.
Upload same picture again.
It will get extra suffix - (1)..
PHP Versionany
Database Versionany



2011-11-24 13:43

reporter   ~0005443

Yes, indeed there are many more places where it happens that pictures are NOT physically deleted. I will start a forum thread about this and/or will report further bugs.
For the category images one solution may be to fix the mentioned $sImgDir assignment like this:

$sImgDir = $sAbsDynImageDir . oxUtilsFile::getInstance()->getImageDirByType( $sPicType );

or consequently:
$sImgDir = $this->getConfig()->getPictureDir(false) . oxUtilsFile::getInstance()->getImageDirByType( $sPicType );

and after that both parameters $sAbsDynImageDir and $sPicDir are obsolet and could be deleted at all. That would simplify the usage of the function overwritePic in class oxutilspic.php. This issue also belongs to wrapping pictures and promo action banners!