Mdale has submitted this change and it was merged.
Change subject: (bug 50617) fix iframe output
......................................................................
(bug 50617) fix iframe output
only set height if widht is set, i.e. if only fillwindow is passed
Bug: 50617
Change-Id: I47d192458c0671e5774e7ce6e453d3c1a7462716
---
M TimedMediaHandler_body.php
M TimedMediaIframeOutput.php
2 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
Mdale: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/TimedMediaHandler_body.php b/TimedMediaHandler_body.php
index 898d12b..3a279c3 100644
--- a/TimedMediaHandler_body.php
+++ b/TimedMediaHandler_body.php
@@ -141,7 +141,6 @@
'height' => $image->getHeight(),
);
}
-
// Make sure we don't try and up-scale the asset:
if( isset( $params['width'] ) && (int)$params['width'] >
$size['width'] ){
$params['width'] = $size['width'];
@@ -152,8 +151,9 @@
$params['width'] = self::fitBoxWidth(
$size['width'], $size['height'], $params['height'] );
}
}
-
- $params['height'] = File::scaleHeight( $size['width'],
$size['height'], $params['width'] );
+ if ( isset( $params['width'] ) ) {
+ $params['height'] = File::scaleHeight( $size['width'],
$size['height'], $params['width'] );
+ }
// Make sure start time is not > than end time
if( isset($params['start'])
diff --git a/TimedMediaIframeOutput.php b/TimedMediaIframeOutput.php
index 32809c5..dc22ca0 100644
--- a/TimedMediaIframeOutput.php
+++ b/TimedMediaIframeOutput.php
@@ -60,7 +60,7 @@
$params = array(
'fillwindow' => true
);
- $videoTransform= $file->transform( $params );
+ $videoTransform = $file->transform( $params );
$wgOut->addModules( array( 'embedPlayerIframeStyle') );
$wgOut->sendCacheControl();
--
To view, visit https://gerrit.wikimedia.org/r/71821
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I47d192458c0671e5774e7ce6e453d3c1a7462716
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: J <[email protected]>
Gerrit-Reviewer: Mdale <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits