Merge branch '3.7'

This commit is contained in:
Romain Neutron
2013-01-09 11:25:14 +01:00
86 changed files with 1605 additions and 758 deletions

View File

@@ -91,8 +91,13 @@ class appbox extends base
if ($pic_type === collection::PIC_LOGO) {
//resize collection logo
$imageSpec = new ImageSpecification();
$imageSpec->setResizeMode(ImageSpecification::RESIZE_MODE_INBOUND_FIXEDRATIO);
$imageSpec->setDimensions(120, 24);
$media = $this->app['mediavorus']->guess($filename);
if($media->getWidth() > 120 || $media->getHeight() > 24) {
$imageSpec->setResizeMode(ImageSpecification::RESIZE_MODE_INBOUND_FIXEDRATIO);
$imageSpec->setDimensions(120, 24);
}
$tmp = tempnam(sys_get_temp_dir(), 'tmpdatabox') . '.jpg';