Visual Console Refactor: bugfixes

Former-commit-id: 09c2b268fd179f81f3041be774f199abe088b4f3
This commit is contained in:
Alejandro Gallardo Escobar 2019-04-23 09:56:02 +02:00
parent 8fc5951209
commit d6bd44d1c0
3 changed files with 3 additions and 17 deletions

View File

@ -262,11 +262,7 @@ final class Group extends Item
// If the width or the height are equal to 0 we will extract them
// from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
if (\is_metaconsole()) {
$imagePath = '../../'.$imagePath;
}
$sizeImage = getimagesize($imagePath);
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
$data['width'] = $sizeImage[0];
$data['height'] = $sizeImage[1];
}

View File

@ -118,12 +118,7 @@ final class Icon extends Item
// If the width or the height are equal to 0 we will extract them
// from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
// Hack to retrieve the image from the metaconsole's index.
if (\is_metaconsole()) {
$imagePath = '../../'.$imagePath;
}
$sizeImage = getimagesize($imagePath);
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
$data['width'] = $sizeImage[0];
$data['height'] = $sizeImage[1];
}

View File

@ -190,12 +190,7 @@ final class StaticGraph extends Item
// If the width or the height are equal to 0 we will extract them
// from the real image size.
if ((int) $data['width'] === 0 || (int) $data['height'] === 0) {
// Hack to retrieve the image from the metaconsole's index.
if (\is_metaconsole()) {
$imagePath = '../../'.$imagePath;
}
$sizeImage = getimagesize($imagePath);
$sizeImage = getimagesize($config['homedir'].'/'.$imagePath);
$data['width'] = $sizeImage[0];
$data['height'] = $sizeImage[1];
}