r96599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96598‎ | r96599 | r96600 >
Date:19:11, 8 September 2011
Author:ialex
Status:ok
Tags:
Comment:
Fix for r96516: undefined variable $flags
Modified paths:
  • /trunk/extensions/SwiftMedia/SwiftMedia.body.php (modified) (history)
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/File.php
@@ -675,10 +675,11 @@
676676 * @param $thumbUrl string: the URL of the thumbnail file.
677677 * @param $params Array: an associative array of handler-specific parameters.
678678 * Typical keys are width, height and page.
 679+ * @param $flags Integer: a bitfield, may contain self::RENDER_NOW to force rendering
679680 *
680681 * @return MediaTransformOutput | false
681682 */
682 - protected function maybeDoTransform( $thumbName, $thumbUrl, $params ) {
 683+ protected function maybeDoTransform( $thumbName, $thumbUrl, $params, $flags = 0 ) {
683684 global $wgIgnoreImageErrors, $wgThumbnailEpoch;
684685
685686 $thumbPath = $this->getThumbPath( $thumbName );
@@ -751,7 +752,7 @@
752753 $thumbName = $this->thumbName( $normalisedParams );
753754 $thumbUrl = $this->getThumbUrl( $thumbName );
754755
755 - $thumb = $this->maybeDoTransform( $thumbName, $thumbUrl, $params );
 756+ $thumb = $this->maybeDoTransform( $thumbName, $thumbUrl, $params, $flags );
756757
757758 // Purge. Useful in the event of Core -> Squid connection failure or squid
758759 // purge collisions from elsewhere during failure. Don't keep triggering for
Index: trunk/extensions/SwiftMedia/SwiftMedia.body.php
@@ -135,7 +135,7 @@
136136 /**
137137 * class-specific transform (from an original into a thumb).
138138 */
139 - function maybeDoTransform( $thumbName, $thumbUrl, $params ) {
 139+ function maybeDoTransform( $thumbName, $thumbUrl, $params, $flags = 0 ) {
140140 global $wgIgnoreImageErrors, $wgThumbnailEpoch, $wgTmpDirectory;
141141
142142 // get a temporary place to put the original.

Sign-offs

UserFlagDate
RussNelsoninspected02:00, 9 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96516split out the inside of File::transform() to avoid copying all of transform f...nelson22:57, 7 September 2011

Status & tagging log