Revision a89c837e
Added by Andreas Kohlbecker about 5 years ago
modules/cdm_dataportal/includes/media.inc | ||
---|---|---|
516 | 516 |
// TODO merge with theme_cdm_media_mime_image? |
517 | 517 |
if (isset($mediaRepresentationPart)) { |
518 | 518 |
|
519 |
$h = $mediaRepresentationPart->height; |
|
520 |
$w = $mediaRepresentationPart->width; |
|
521 |
if ($w == 0 || $h == 0) {
|
|
519 |
$h = @$mediaRepresentationPart->height;
|
|
520 |
$w = @$mediaRepresentationPart->width;
|
|
521 |
if (!($w && $h)) {
|
|
522 | 522 |
// Take url and replace spaces. |
523 | 523 |
$image_uri = str_replace(' ', '%20', $mediaRepresentationPart->uri); |
524 | 524 |
$imageDimensions = getimagesize_remote($image_uri); |
... | ... | |
654 | 654 |
// TODO merge code below with code from theme_cdm_media_gallerie_image |
655 | 655 |
// var_dump("MEDIA URI: " . $mediaRepresentationPart->uri); |
656 | 656 |
// TODO merge code below with code from theme_cdm_media_gallerie_image |
657 |
$w = $mediaRepresentationPart->width; |
|
658 |
$h = $mediaRepresentationPart->height; |
|
657 |
$w = @$mediaRepresentationPart->width;
|
|
658 |
$h = @$mediaRepresentationPart->height;
|
|
659 | 659 |
|
660 |
if ($w == 0 || $h == 0) {
|
|
660 |
if (!($w && $h)) {
|
|
661 | 661 |
// Take url and replace spaces. |
662 | 662 |
$image_uri = str_replace(' ', '%20', $mediaRepresentationPart->uri); |
663 | 663 |
$imageDimensions = getimagesize_remote($image_uri); |
Also available in: Unified diff
avoiding warings du do missing cdm media.height and width