Replace calls to mediavorus to getMediaFromUri

This commit is contained in:
Benoît Burnichon
2015-05-12 18:12:02 +02:00
parent 81e8fcb606
commit 61206fd517
15 changed files with 40 additions and 41 deletions

View File

@@ -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);

View File

@@ -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']);

View File

@@ -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);

View File

@@ -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();
}