From 83f6c31dd638482d4788e60c923711386913a380 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Thu, 4 Sep 2014 15:11:52 +0000 Subject: [PATCH] Fix styles screeenshots --- src/mibew/libs/classes/Mibew/Controller/StyleController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mibew/libs/classes/Mibew/Controller/StyleController.php b/src/mibew/libs/classes/Mibew/Controller/StyleController.php index a497baad..a9323415 100644 --- a/src/mibew/libs/classes/Mibew/Controller/StyleController.php +++ b/src/mibew/libs/classes/Mibew/Controller/StyleController.php @@ -110,16 +110,14 @@ class StyleController extends AbstractController */ protected function buildScreenshotList(StyleInterface $style) { - $base_url = $this->getRouter()->getContext()->getBaseUrl(); + $base_path = $style->getFilesPath() . '/screenshots'; $style_config = $style->getConfigurations(); $screenshots = array(); foreach ($style_config['screenshots'] as $name => $desc) { $screenshots[] = array( 'name' => $name, - 'file' => ($base_url . '/' - . $style->getFilesPath() . '/screenshots/' - . $name . '.png'), + 'file' => $this->asset($base_path . '/' . $name . '.png'), 'description' => $desc, ); }