Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
+4
-5
@@ -409,9 +409,8 @@ class ImageCore extends ObjectModel
|
||||
// Delete auto-generated images
|
||||
$image_types = ImageType::getImagesTypes();
|
||||
foreach ($image_types as $image_type)
|
||||
{
|
||||
$files_to_delete[] = $this->image_dir.$this->getExistingImgPath().'-'.$image_type['name'].'.'.$this->image_format;
|
||||
}
|
||||
|
||||
// Delete watermark image
|
||||
$files_to_delete[] = $this->image_dir.$this->getExistingImgPath().'-watermark.'.$this->image_format;
|
||||
// delete index.php
|
||||
@@ -533,11 +532,11 @@ class ImageCore extends ObjectModel
|
||||
if (!file_exists(_PS_PROD_IMG_DIR_.$this->getImgFolder()))
|
||||
{
|
||||
// Apparently sometimes mkdir cannot set the rights, and sometimes chmod can't. Trying both.
|
||||
$success = @mkdir(_PS_PROD_IMG_DIR_.$this->getImgFolder(), self::$access_rights, true)
|
||||
|| @chmod(_PS_PROD_IMG_DIR_.$this->getImgFolder(), self::$access_rights);
|
||||
$success = @mkdir(_PS_PROD_IMG_DIR_.$this->getImgFolder(), self::$access_rights, true);
|
||||
$chmod = @chmod(_PS_PROD_IMG_DIR_.$this->getImgFolder(), self::$access_rights);
|
||||
|
||||
// Create an index.php file in the new folder
|
||||
if ($success
|
||||
if (($success || $chmod)
|
||||
&& !file_exists(_PS_PROD_IMG_DIR_.$this->getImgFolder().'index.php')
|
||||
&& file_exists($this->source_index))
|
||||
return @copy($this->source_index, _PS_PROD_IMG_DIR_.$this->getImgFolder().'index.php');
|
||||
|
||||
+1
-1
@@ -806,7 +806,7 @@ class ProductCore extends ObjectModel
|
||||
SELECT c.`id_category`
|
||||
FROM `'._DB_PREFIX_.'category_product` cp
|
||||
LEFT JOIN `'._DB_PREFIX_.'category` c ON (c.`id_category` = cp.`id_category`)
|
||||
'.Shop::addSqlAssociation('category', 'c', true).'
|
||||
'.Shop::addSqlAssociation('category', 'c', true, null, true).'
|
||||
WHERE cp.`id_category` NOT IN ('.implode(',', array_map('intval', $categories)).')
|
||||
AND cp.id_product = '.$this->id
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user