// Fixed what is I hope the last image bug

This commit is contained in:
dMetzger
2012-09-27 10:09:15 +00:00
parent 18652ee685
commit 40fa55bd54
3 changed files with 10 additions and 3 deletions
+8 -1
View File
@@ -515,7 +515,14 @@ class LanguageCore extends ObjectModel
if (!$this->hasMultishopEntries())
{
// delete images
$files_copy = array('/en.jpg', '/en-default-thickbox.jpg', '/en-default-home.jpg', '/en-default-large.jpg', '/en-default-medium.jpg', '/en-default-small.jpg', '/en-default-large_scene.jpg');
$files_copy = array(
'/en.jpg',
'/en-default-thickbox_default.jpg',
'/en-default-home_default.jpg',
'/en-default-large_default.jpg',
'/en-default-medium_default.jpg',
'/en-default-small_default.jpg'
);
$tos = array(_PS_CAT_IMG_DIR_, _PS_MANU_IMG_DIR_, _PS_PROD_IMG_DIR_, _PS_SUPP_IMG_DIR_);
foreach ($tos as $to)
foreach ($files_copy as $file)
+1 -1
View File
@@ -119,7 +119,7 @@ class SupplierControllerCore extends FrontController
$suppliers = Supplier::getSuppliers(true, $this->context->language->id, true, $this->p, $this->n);
foreach ($suppliers as &$row)
$row['image'] = (!file_exists(_PS_SUPP_IMG_DIR_.'/'.$row['id_supplier'].'-medium.jpg')) ? $this->context->language->iso_code.'-default' : $row['id_supplier'];
$row['image'] = (!file_exists(_PS_SUPP_IMG_DIR_.'/'.$row['id_supplier'].'-medium_default.jpg')) ? $this->context->language->iso_code.'-default' : $row['id_supplier'];
$this->context->smarty->assign(array(
'pages_nb' => ceil($nbProducts / (int)$this->n),
+1 -1
View File
@@ -63,7 +63,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
if (is_array($image) AND sizeof($image))
{
$imageObj = new Image($image[0]['id_image']);
echo "<![CDATA[<img src='"._PS_BASE_URL_._THEME_PROD_DIR_.$imageObj->getExistingImgPath()."-small.jpg' title='".str_replace('&', '', $product['name'])."' alt='thumb' />";
echo "<![CDATA[<img src='"._PS_BASE_URL_._THEME_PROD_DIR_.$imageObj->getExistingImgPath()."-small_default.jpg' title='".str_replace('&', '', $product['name'])."' alt='thumb' />";
$cdata = false;
}
if ($cdata)