r103341 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103340‎ | r103341 | r103342 >
Date:16:59, 16 November 2011
Author:vitalif
Status:ok (Comments)
Tags:
Comment:
Bug 22194 - Check for any multiple of 90, as PDF reference allows it. Followup to r103313.
Modified paths:
  • /trunk/extensions/PdfHandler/PdfHandler.image.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PdfHandler/PdfHandler.image.php
@@ -72,7 +72,7 @@
7373 $width = intval( trim( $size[0] ) / 72 * $wgPdfHandlerDpi );
7474 $height = explode( ' ', trim( $size[1] ), 2 );
7575 $height = intval( trim( $height[0] ) / 72 * $wgPdfHandlerDpi );
76 - if ( $r == 90 || $r == 270 ) {
 76+ if ( ( $r/90 ) & 1 ) {
7777 // Swap width and height for landscape pages
7878 $t = $width;
7979 $width = $height;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103313Bug 22194 - Respect page rotation that will be reported by poppler 0.20vitalif11:45, 16 November 2011

Comments

#Comment by Johnduhart (talk | contribs)   03:33, 18 November 2011
+				if ( ( $r/90 ) & 1 ) {

Should be a space around the forward-slash per our coding converntions.

Status & tagging log