//small improvement
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16537 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
d6df4781c5
commit
9db5f5729a
1 file changed
+6
-6
@@ -153,16 +153,16 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
|
|||||||
$thumb = imagecreatetruecolor($newwidth, $newheight);
|
$thumb = imagecreatetruecolor($newwidth, $newheight);
|
||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case 1:
|
case IMAGETYPE_GIF:
|
||||||
$source = imagecreatefromgif($file['tmp_name']);
|
$source = imagecreatefromgif($file['tmp_name']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case IMAGETYPE_PNG:
|
||||||
$source = imagecreatefromjpeg($file['tmp_name']);
|
$source = imagecreatefrompng($file['tmp_name']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case IMAGETYPE_JPEG:
|
||||||
$source = imagecreatefrompng($file['tmp_name']);
|
$source = imagecreatefromjpeg($file['tmp_name']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -172,7 +172,7 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
|
|||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
|
imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
|
||||||
if (!is_writable(_PS_ROOT_DIR_.'/img/logo.jpg'))
|
if (!is_writable(_PS_ROOT_DIR_.'/img/'))
|
||||||
$error = $this->l('Image folder %s is not writable', _PS_ROOT_DIR_.'/img/');
|
$error = $this->l('Image folder %s is not writable', _PS_ROOT_DIR_.'/img/');
|
||||||
else if (!imagejpeg($thumb, _PS_ROOT_DIR_.'/img/logo.jpg', 90))
|
else if (!imagejpeg($thumb, _PS_ROOT_DIR_.'/img/logo.jpg', 90))
|
||||||
$error = $this->l('Cannot upload the file');
|
$error = $this->l('Cannot upload the file');
|
||||||
|
|||||||
Reference in new issue
Block a user