Skip to main content

Bug discovered deletes category image

More
10 years 5 months ago #236295 by csymmonds
-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6.17
-- Browser(s) name and version -- : Firefox 45.0.2
-- Error-message(debug-mod must be tuned on) -- : Not applicable

I discovered a bug in the use of category images that is fairly easy to recreate.

If two or more categories use the same image, editing any one of those categories to use a different image will cause the original image to be deleted even though it is still referenced by other categories.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #236380 by Xavier
Hi,

Thank you for this report. You can download the latest package from our website, it includes this hot fix.
Or you can directly edit the file "administrator/components/com_hikashop/classes/file.php" and in the function "storeFiles()" replace:
Code:
if((empty($keepFiles) || !in_array($old,$keepFiles)) && JFile::exists($uploadPath . $old))
By:
Code:
if((empty($keepEntries) || !in_array($old,$keepEntries)) && JFile::exists($uploadPath . $old))
The following user(s) said Thank You: csymmonds, trevsmiff

Please Log in or Create an account to join the conversation.

Time to create page: 0.160 seconds
Powered by Kunena Forum