mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Fix Bug #53185 (icon width/height adjustement for icons > 127px also applied on smilies) - related to r10088
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10234 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6d1c40f6e6
commit
6ca7b21dc9
1 changed files with 27 additions and 20 deletions
|
@ -89,16 +89,19 @@ class acp_icons
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// adjust the width and height to be lower than 128px while perserving the aspect ratio
|
// adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
|
||||||
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
|
if ($mode == 'icons')
|
||||||
{
|
{
|
||||||
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
|
if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
|
||||||
$img_size[0] = 127;
|
{
|
||||||
}
|
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
|
||||||
else if ($img_size[1] > 127)
|
$img_size[0] = 127;
|
||||||
{
|
}
|
||||||
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
|
else if ($img_size[1] > 127)
|
||||||
$img_size[1] = 127;
|
{
|
||||||
|
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
|
||||||
|
$img_size[1] = 127;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$_images[$path . $img]['file'] = $path . $img;
|
$_images[$path . $img]['file'] = $path . $img;
|
||||||
|
@ -400,15 +403,19 @@ class acp_icons
|
||||||
$image_height[$image] = $img_size[1];
|
$image_height[$image] = $img_size[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
|
// Adjust image width/height for icons
|
||||||
|
if ($mode == 'icons')
|
||||||
{
|
{
|
||||||
$image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
|
if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
|
||||||
$image_width[$image] = 127;
|
{
|
||||||
}
|
$image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
|
||||||
else if ($image_height[$image] > 127)
|
$image_width[$image] = 127;
|
||||||
{
|
}
|
||||||
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
|
else if ($image_height[$image] > 127)
|
||||||
$image_height[$image] = 127;
|
{
|
||||||
|
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
|
||||||
|
$image_height[$image] = 127;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$img_sql = array(
|
$img_sql = array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue