https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111876
Revision: 111876
Author: amire80
Date: 2012-02-19 18:42:15 +0000 (Sun, 19 Feb 2012)
Log Message:
-----------
Checking for empty method.
Made a long expression more readable.
Follow up to r111864.
Modified Paths:
--------------
trunk/extensions/timeline/Timeline.php
Modified: trunk/extensions/timeline/Timeline.php
===================================================================
--- trunk/extensions/timeline/Timeline.php 2012-02-19 17:25:22 UTC (rev
111875)
+++ trunk/extensions/timeline/Timeline.php 2012-02-19 18:42:15 UTC (rev
111876)
@@ -64,7 +64,8 @@
global $wgUploadDirectory, $wgUploadPath, $wgArticlePath,
$wgTmpDirectory, $wgRenderHashAppend;
global $wgTimelineSettings;
- $svg2png = ( $args['method'] == 'svg2png' );
+ $method = isset( $args['method'] ) ? $args['method'] : 'ploticusOnly';
+ $svg2png = ( $method == 'svg2png' );
// Get the backend to store plot data and pngs
if ( $wgTimelineSettings->fileBackend != '' ) {
@@ -112,8 +113,10 @@
// map, and rendering (png or gif) file under the same
dir as the temp file.
$cmdline = wfEscapeShellArg(
$wgTimelineSettings->perlCommand, $wgTimelineSettings->timelineFile ) .
($svg2png ? " -s " : "") .
- " -i " . wfEscapeShellArg( $tmpPath ) . " -m -P " .
wfEscapeShellArg( $wgTimelineSettings->ploticusCommand ) .
- " -T " . wfEscapeShellArg( $wgTmpDirectory ) . " -A " .
wfEscapeShellArg( $wgArticlePath ) .
+ " -i " . wfEscapeShellArg( $tmpPath ) .
+ " -m -P " . wfEscapeShellArg(
$wgTimelineSettings->ploticusCommand ) .
+ " -T " . wfEscapeShellArg( $wgTmpDirectory ) .
+ " -A " . wfEscapeShellArg( $wgArticlePath ) .
" -f " . wfEscapeShellArg(
$wgTimelineSettings->fontFile );
// Actually run the command...
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs