// Changed image system to new default + #PSCFV-4068
This commit is contained in:
1 parent
b7be2d64d4
commit
84b0aa79b2
4 files changed
+5
-19
No files matched your search
@@ -256,7 +256,10 @@ class HelperListCore extends Helper
|
|||||||
{
|
{
|
||||||
// item_id is the product id in a product image context, else it is the image id.
|
// item_id is the product id in a product image context, else it is the image id.
|
||||||
$item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id;
|
$item_id = isset($params['image_id']) ? $tr[$params['image_id']] : $id;
|
||||||
|
if ($params['image'] != 'p' || Configuration::get('PS_LEGACY_IMAGES'))
|
||||||
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)$tr['id_image'] : '').'.'.$this->imageType;
|
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.$item_id.(isset($tr['id_image']) ? '-'.(int)$tr['id_image'] : '').'.'.$this->imageType;
|
||||||
|
else
|
||||||
|
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.Image::getImgFolderStatic($tr['id_image']).(int)$tr['id_image'].'.'.$this->imageType;
|
||||||
$this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
|
$this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
|
||||||
}
|
}
|
||||||
elseif (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
elseif (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
||||||
|
|||||||
@@ -611,6 +611,7 @@ class InstallXmlLoader
|
|||||||
$this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier.'-'.$type['name'], $entity));
|
$this->setError($this->language->l('Cannot create image "%1$s" for entity "%2$s"', $identifier.'-'.$type['name'], $entity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Image::moveToNewFileSystem();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function copyImagesScene($identifier, array $data)
|
public function copyImagesScene($identifier, array $data)
|
||||||
|
|||||||
@@ -393,7 +393,7 @@
|
|||||||
<value>12</value>
|
<value>12</value>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration id="PS_LEGACY_IMAGES" name="PS_LEGACY_IMAGES">
|
<configuration id="PS_LEGACY_IMAGES" name="PS_LEGACY_IMAGES">
|
||||||
<value>1</value>
|
<value>0</value>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration id="PS_IMAGE_QUALITY" name="PS_IMAGE_QUALITY">
|
<configuration id="PS_IMAGE_QUALITY" name="PS_IMAGE_QUALITY">
|
||||||
<value>jpg</value>
|
<value>jpg</value>
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
die;
|
|
||||||
foreach (scandir('.') as $dir)
|
|
||||||
if ($dir[0] != '.')
|
|
||||||
foreach (scandir($dir) as $file)
|
|
||||||
{
|
|
||||||
if ($file[0] == '.')
|
|
||||||
continue;
|
|
||||||
$name = $file;
|
|
||||||
foreach (array('small', 'large', 'medium', 'thickbox', 'category', 'home') as $type)
|
|
||||||
$name = str_replace($type, $type.'_default', $name);
|
|
||||||
$name = str_replace('large_scene', 'scene_default', $name);
|
|
||||||
$name = str_replace('thumb_scene', 'm_scene_default', $name);
|
|
||||||
|
|
||||||
echo($dir.'/'.$file);
|
|
||||||
echo($dir.'/'.$name);
|
|
||||||
rename($dir.'/'.$file, $dir.'/'.$name);
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user