[-] BO : FixBug #PSCFV-8217 Shop logo image not refresh after change
This commit is contained in:
@@ -76,7 +76,7 @@ class ImageManagerCore
|
|||||||
}
|
}
|
||||||
// Relative link will always work, whatever the base uri set in the admin
|
// Relative link will always work, whatever the base uri set in the admin
|
||||||
if (Context::getContext()->controller->controller_type == 'admin')
|
if (Context::getContext()->controller->controller_type == 'admin')
|
||||||
return '<img src="../img/tmp/'.$cache_image.(!$disable_cache ? '?time='.time() : '').'" alt="" class="imgm" />';
|
return '<img src="..'.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.''.$cache_image.(!$disable_cache ? '?time='.time() : '').'" alt="" class="imgm" />';
|
||||||
else
|
else
|
||||||
return '<img src="'._PS_TMP_IMG_.$cache_image.(!$disable_cache ? '?time='.time() : '').'" alt="" class="imgm" />';
|
return '<img src="'._PS_TMP_IMG_.$cache_image.(!$disable_cache ? '?time='.time() : '').'" alt="" class="imgm" />';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,8 +296,12 @@ class AdminStoresControllerCore extends AdminController
|
|||||||
|
|
||||||
if (!($obj = $this->loadObject(true)))
|
if (!($obj = $this->loadObject(true)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (file_exists(_PS_TMP_IMG_DIR_.$this->table.'_'.(int)$obj->id.'.'.$this->imageType)) {
|
||||||
|
@unlink(_PS_TMP_IMG_DIR_.$this->table.'_'.(int)$obj->id.'.'.$this->imageType);
|
||||||
|
}
|
||||||
|
|
||||||
$image = ImageManager::thumbnail(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true);
|
$image = ImageManager::thumbnail(_PS_STORE_IMG_DIR_.DIRECTORY_SEPARATOR.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true, true);
|
||||||
|
|
||||||
$days = array();
|
$days = array();
|
||||||
$days[1] = $this->l('Monday');
|
$days[1] = $this->l('Monday');
|
||||||
@@ -316,7 +320,7 @@ class AdminStoresControllerCore extends AdminController
|
|||||||
'latitude' => $this->getFieldValue($obj, 'latitude') ? $this->getFieldValue($obj, 'latitude') : Configuration::get('PS_STORES_CENTER_LAT'),
|
'latitude' => $this->getFieldValue($obj, 'latitude') ? $this->getFieldValue($obj, 'latitude') : Configuration::get('PS_STORES_CENTER_LAT'),
|
||||||
'longitude' => $this->getFieldValue($obj, 'longitude') ? $this->getFieldValue($obj, 'longitude') : Configuration::get('PS_STORES_CENTER_LONG'),
|
'longitude' => $this->getFieldValue($obj, 'longitude') ? $this->getFieldValue($obj, 'longitude') : Configuration::get('PS_STORES_CENTER_LONG'),
|
||||||
'image' => $image ? $image : false,
|
'image' => $image ? $image : false,
|
||||||
'size' => $image ? filesize(_PS_STORE_IMG_DIR_.'/'.$obj->id.'.jpg') / 1000 : false,
|
'size' => $image ? filesize(_PS_STORE_IMG_DIR_.DIRECTORY_SEPARATOR.$obj->id.'.jpg') / 1000 : false,
|
||||||
'days' => $days,
|
'days' => $days,
|
||||||
'hours' => isset($hours_unserialized) ? $hours_unserialized : false
|
'hours' => isset($hours_unserialized) ? $hours_unserialized : false
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user