mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Replace calls to mediavorus to getMediaFromUri
This commit is contained in:
@@ -66,7 +66,7 @@ class appbox extends base
|
||||
//resize collection logo
|
||||
$imageSpec = new ImageSpecification();
|
||||
|
||||
$media = $this->app['mediavorus']->guess($filename);
|
||||
$media = $this->app->getMediaFromUri($filename);
|
||||
|
||||
if ($media->getWidth() > 120 || $media->getHeight() > 24) {
|
||||
$imageSpec->setResizeMode(ImageSpecification::RESIZE_MODE_INBOUND_FIXEDRATIO);
|
||||
|
@@ -108,7 +108,7 @@ class patch_370alpha7a extends patchAbstract
|
||||
|
||||
}
|
||||
|
||||
$media = $app['mediavorus']->guess($filePath);
|
||||
$media = $app->getMediaFromUri($filePath);
|
||||
|
||||
$collection = \collection::get_from_base_id($app, $row['base_id']);
|
||||
|
||||
|
@@ -915,7 +915,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
}
|
||||
|
||||
$app['filesystem']->chmod($subdefFile, 0760);
|
||||
$media = $app['mediavorus']->guess($subdefFile);
|
||||
$media = $app->getMediaFromUri($subdefFile);
|
||||
$subdef = media_subdef::create($app, $this, $name, $media);
|
||||
$subdef->set_substituted(true);
|
||||
|
||||
@@ -1274,7 +1274,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
|
||||
|
||||
$app['filesystem']->copy($file->getFile()->getRealPath(), $pathhd . $newname, true);
|
||||
|
||||
$media = $app['mediavorus']->guess($pathhd . $newname);
|
||||
$media = $app->getMediaFromUri($pathhd . $newname);
|
||||
media_subdef::create($app, $record, 'document', $media);
|
||||
|
||||
$record->delete_data_from_cache(\record_adapter::CACHE_SUBDEFS);
|
||||
|
@@ -61,7 +61,7 @@ class recordutils_image
|
||||
|
||||
$rotation = null;
|
||||
try {
|
||||
$image = $app['mediavorus']->guess($subdef->get_pathfile());
|
||||
$image = $app->getMediaFromUri($subdef->get_pathfile());
|
||||
if (MediaInterface::TYPE_IMAGE === $image->getType()) {
|
||||
$rotation = $image->getOrientation();
|
||||
}
|
||||
|
Reference in New Issue
Block a user