r111876 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111875‎ | r111876 | r111877 >
Date:18:42, 19 February 2012
Author:amire80
Status:ok
Tags:
Comment:
Checking for empty method.
Made a long expression more readable.
Follow up to r111864.
Modified paths:
  • /trunk/extensions/timeline/Timeline.php (modified) (history)

Diff [purge]

Index: trunk/extensions/timeline/Timeline.php
@@ -64,7 +64,8 @@
6565 global $wgUploadDirectory, $wgUploadPath, $wgArticlePath, $wgTmpDirectory, $wgRenderHashAppend;
6666 global $wgTimelineSettings;
6767
68 - $svg2png = ( $args['method'] == 'svg2png' );
 68+ $method = isset( $args['method'] ) ? $args['method'] : 'ploticusOnly';
 69+ $svg2png = ( $method == 'svg2png' );
6970
7071 // Get the backend to store plot data and pngs
7172 if ( $wgTimelineSettings->fileBackend != '' ) {
@@ -112,8 +113,10 @@
113114 // map, and rendering (png or gif) file under the same dir as the temp file.
114115 $cmdline = wfEscapeShellArg( $wgTimelineSettings->perlCommand, $wgTimelineSettings->timelineFile ) .
115116 ($svg2png ? " -s " : "") .
116 - " -i " . wfEscapeShellArg( $tmpPath ) . " -m -P " . wfEscapeShellArg( $wgTimelineSettings->ploticusCommand ) .
117 - " -T " . wfEscapeShellArg( $wgTmpDirectory ) . " -A " . wfEscapeShellArg( $wgArticlePath ) .
 117+ " -i " . wfEscapeShellArg( $tmpPath ) .
 118+ " -m -P " . wfEscapeShellArg( $wgTimelineSettings->ploticusCommand ) .
 119+ " -T " . wfEscapeShellArg( $wgTmpDirectory ) .
 120+ " -A " . wfEscapeShellArg( $wgArticlePath ) .
118121 " -f " . wfEscapeShellArg( $wgTimelineSettings->fontFile );
119122
120123 // Actually run the command...

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111864Replaced the svgOnly setting with a method parameter to the <timeline> tag, s...amire8014:09, 19 February 2012

Status & tagging log