r101066 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101065‎ | r101066 | r101067 >
Date:21:41, 27 October 2011
Author:vitalif
Status:ok (Comments)
Tags:
Comment:
Revert stuff vulnerable to register_globals
Modified paths:
  • /branches/vitalif/extensions/PdfHandler/PdfHandler.php (modified) (history)
  • /branches/vitalif/extensions/PdfHandler/poppler-utils.diff (modified) (history)

Diff [purge]

Property changes on: branches/vitalif/extensions/PdfHandler/poppler-utils.diff
___________________________________________________________________
Added: svn:eol-style
11 + native
Index: branches/vitalif/extensions/PdfHandler/PdfHandler.php
@@ -45,23 +45,22 @@
4646 );
4747
4848 // External program requirements...
49 -if ( !isset( $wgPdfProcessor ) ) $wgPdfProcessor = 'gs';
50 -if ( !isset( $wgPdfInfo ) ) $wgPdfInfo = 'pdfinfo';
51 -if ( !isset( $wgPdftoText ) ) $wgPdftoText = 'pdftotext';
 49+$wgPdfProcessor = 'gs';
 50+$wgPdfInfo = 'pdfinfo';
 51+$wgPdftoText = 'pdftotext';
5252
53 -// GhostScript's output device name and file extension
54 -if ( !isset( $wgPdfOutputDevice ) ) $wgPdfOutputDevice = 'jpeg';
55 -if ( !isset( $wgPdfOutputExtension ) ) $wgPdfOutputExtension = 'jpg';
 53+$wgPdfOutputDevice = 'jpeg';
 54+$wgPdfOutputExtension = 'jpg';
5655
5756 // Now PdfHandler selects output DPI by itself, based on requested image size
5857 // If you want more quality, specify a power of 2 here.
5958 // Generated images will be downscaled by browser.
60 -if ( !isset( $wgPdfDpiRatio ) ) $wgPdfDpiRatio = 2;
 59+$wgPdfDpiRatio = 1;
6160
6261 // This setting, if enabled, will put creating thumbnails into a job queue,
6362 // so they do not have to be created on-the-fly,
6463 // but rather inconspicuously during normal wiki browsing
65 -if ( !isset( $wgPdfCreateThumbnailsInJobQueue ) ) $wgPdfCreateThumbnailsInJobQueue = false;
 64+$wgPdfCreateThumbnailsInJobQueue = false;
6665
6766 // Enable PDF upload by default. If you want to forbid PDF upload - do so in your LocalSettings.php
6867 $wgFileExtensions[] = 'pdf';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100426Add patch which fixes pdfinfo to respect page rotation when reporting the size....vitalif15:55, 21 October 2011

Comments

#Comment by Nikerabbit (talk | contribs)   07:22, 28 October 2011

This is followup to r100426.

Status & tagging log