Commit ffdb5fac authored by Jérôme Chauveau's avatar Jérôme Chauveau
Browse files

omp : image path patch

parent 01b34d48
Loading
Loading
Loading
Loading
+5 −3
Changes for BookImageDataHandler.inc.php: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -66,12 +66,14 @@ class BookImageDataHandler extends CatalogBookHandler
                $publicationFile = $file;
            }
        }
        $filename = Services::get('file')
            ->formatFilename($publicationFile->getData('path'), $publicationFile->getLocalizedData('path'));
        $pathInfo = pathinfo($filename);
//        $filename = Services::get('file')
//            ->formatFilename($publicationFile->getData('path'), $publicationFile->getLocalizedData('path'));
//        var_dump($filename);
        $pathInfo = pathinfo($publicationFile->getData('path'));
        $imagePath = $pathInfo['dirname'] . DIRECTORY_SEPARATOR . $pathInfo['filename'] . DIRECTORY_SEPARATOR . $imgName;
        return Services::get('file')->download($imagePath, $imgName);


    }