Siebrand has uploaded a new change for review.
https://gerrit.wikimedia.org/r/99377
Change subject: Do not access MediaTransformOutput->url directly in Linker
......................................................................
Do not access MediaTransformOutput->url directly in Linker
Use the available getUrl(). Also update parameter documentation.
This will allow setting MediaTransformOutput::$url to protected in a
following patch.
Change-Id: I54dfbbc845d1fccd106afc7de1f06fa6e06f6a48
---
M includes/Linker.php
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/77/99377/1
diff --git a/includes/Linker.php b/includes/Linker.php
index 7c6bbc6..cb6129c 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -898,7 +898,7 @@
* applicable.
*
* @param File $file
- * @param MediaOutput $thumb
+ * @param MediaTransformOutput $thumb
* @param array $hp image parameters
*/
public static function processResponsiveImages( $file, $thumb, $hp ) {
@@ -915,11 +915,11 @@
$thumb15 = $file->transform( $hp15 );
$thumb20 = $file->transform( $hp20 );
- if ( $thumb15->url !== $thumb->url ) {
- $thumb->responsiveUrls['1.5'] = $thumb15->url;
+ if ( $thumb15->getUrl() !== $thumb->getUrl() ) {
+ $thumb->responsiveUrls['1.5'] =
$thumb15->getUrl();
}
- if ( $thumb20->url !== $thumb->url ) {
- $thumb->responsiveUrls['2'] = $thumb20->url;
+ if ( $thumb20->getUrl() !== $thumb->getUrl() ) {
+ $thumb->responsiveUrls['2'] =
$thumb20->getUrl();
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/99377
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54dfbbc845d1fccd106afc7de1f06fa6e06f6a48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits