diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php index 390853ec80..b2350aeec3 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Group.php @@ -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]; } diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php b/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php index 8272ab67ae..925fad1c06 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/Icon.php @@ -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]; } diff --git a/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php b/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php index 08f510b683..255c1a5636 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Items/StaticGraph.php @@ -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]; }