Remaining png extensions in the code have been removed

This commit is contained in:
David 2018-02-19 10:57:58 +01:00
parent 674d095cf0
commit b4894392cd

View File

@ -41,7 +41,7 @@ class AdminLandingPages extends AdminTab {
}
if(isset($_FILES['img2_'.$language['id_lang']]) && $_FILES['img2_'.$language['id_lang']]['name'] != '') {
if(!copy($_FILES['img2_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/landingpages/img/'.$id_landing_page.'_2_'.$language['id_lang'].'.png')) {
if(!copy($_FILES['img2_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/landingpages/img/'.$id_landing_page.'_2_'.$language['id_lang'].'.jpg')) {
$this->_errors[] = $this->l('An error occured during the image upload.');
}
}
@ -93,7 +93,7 @@ class AdminLandingPages extends AdminTab {
}
if(isset($_FILES['img2_'.$language['id_lang']]) && $_FILES['img2_'.$language['id_lang']]['name'] != '') {
if(!copy($_FILES['img2_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/landingpages/img/'.$id_landing_page.'_2_'.$language['id_lang'].'.png')) {
if(!copy($_FILES['img2_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/landingpages/img/'.$id_landing_page.'_2_'.$language['id_lang'].'.jpg')) {
$this->_errors[] = $this->l('An error occured during the image upload.');
}
}
@ -359,9 +359,9 @@ class AdminLandingPages extends AdminTab {
echo '<div id="img2_'.$language['id_lang'].'" style="display: '.($language['id_lang'] == $this->_defaultFormLanguage ? 'block' : 'none').'; float: left;">
<input type="file" name="img2_'.$language['id_lang'].'" />
<p>'.$this->l('Size:').' '.$this->l('img2 size').'</p>';
if($this->curlp && file_exists(_PS_ROOT_DIR_.'/modules/landingpages/img/'.$this->curlp['id_landing_page'].'_2_'.$language['id_lang'].'.png')) {
if($this->curlp && file_exists(_PS_ROOT_DIR_.'/modules/landingpages/img/'.$this->curlp['id_landing_page'].'_2_'.$language['id_lang'].'.jpg')) {
echo '<img src="'.__PS_BASE_URI__.'modules/landingpages/img/'.$this->curlp['id_landing_page'].'_2_'.$language['id_lang'].'.jpg" width="350" /><br>
<p><a href="'.__PS_BASE_URI__.'modules/landingpages/img/'.$this->curlp['id_landing_page'].'_2_'.$language['id_lang'].'.png" onclick="window.open(this.href); return false;"> '.$this->l('Preview').'</a></p>';
<p><a href="'.__PS_BASE_URI__.'modules/landingpages/img/'.$this->curlp['id_landing_page'].'_2_'.$language['id_lang'].'.jpg" onclick="window.open(this.href); return false;"> '.$this->l('Preview').'</a></p>';
}
echo '
</div>';