Merge branch 'ticket-11210-imageVP' into develop
This commit is contained in:
commit
a9c19b6c6c
@ -951,7 +951,15 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
|
||||
foreach(Language::getLanguages(FALSE) as $language) {
|
||||
foreach(array_keys($this->imagelist) as $img) {
|
||||
if(isset($_FILES['img_'.$img.'_'.$language['id_lang']]) && $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] != '') {
|
||||
if((int)$language['id_lang'] == 3
|
||||
&& (!isset($_FILES['img_'.$img.'_'.$language['id_lang']]) || $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] == '')
|
||||
&& (isset($_FILES['img_'.$img.'_2']) && $_FILES['img_'.$img.'_2']['name'] != '')
|
||||
) {
|
||||
if(!copy($_FILES['img_'.$img.'_2']['tmp_name'], _PS_ROOT_DIR_.'/modules/privatesales/img/'.$sale->id.'/'.$img.'_'.$language['id_lang'].'.jpg')) {
|
||||
echo $this->displayError($this->l('An error occured during the image upload.'));
|
||||
}
|
||||
}
|
||||
elseif(isset($_FILES['img_'.$img.'_'.$language['id_lang']]) && $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] != '') {
|
||||
if(!copy($_FILES['img_'.$img.'_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/privatesales/img/'.$sale->id.'/'.$img.'_'.$language['id_lang'].'.jpg')) {
|
||||
echo $this->displayError($this->l('An error occured during the image upload.'));
|
||||
}
|
||||
@ -1019,7 +1027,15 @@ class AdminPrivateSalesSales extends AdminTab {
|
||||
|
||||
foreach(Language::getLanguages(FALSE) as $language) {
|
||||
foreach(array_keys($this->imagelist) as $img) {
|
||||
if(isset($_FILES['img_'.$img.'_'.$language['id_lang']]) && $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] != '') {
|
||||
if((int)$language['id_lang'] == 3
|
||||
&& (!isset($_FILES['img_'.$img.'_'.$language['id_lang']]) || $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] == '')
|
||||
&& (isset($_FILES['img_'.$img.'_2']) && $_FILES['img_'.$img.'_2']['name'] != '')
|
||||
) {
|
||||
if(!copy($_FILES['img_'.$img.'_2']['tmp_name'], _PS_ROOT_DIR_.'/modules/privatesales/img/'.$sale->id.'/'.$img.'_'.$language['id_lang'].'.jpg')) {
|
||||
echo $this->displayError($this->l('An error occured during the image upload.'));
|
||||
}
|
||||
}
|
||||
elseif(isset($_FILES['img_'.$img.'_'.$language['id_lang']]) && $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] != '') {
|
||||
if(!copy($_FILES['img_'.$img.'_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/privatesales/img/'.$sale->id.'/'.$img.'_'.$language['id_lang'].'.jpg')) {
|
||||
echo $this->displayError($this->l('An error occured during the image upload.'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user