Index: trunk/extensions/Plotter/PlotterParser.php |
— | — | @@ -54,15 +54,16 @@ |
55 | 55 | // Parse and sanitize arguments - escape single quotes and backslashes |
56 | 56 | $arguments = explode( ':', $argv["preprocessorarguments"] ); |
57 | 57 | foreach ( $arguments as $argument ) { |
58 | | - list($argumentkey, $argumentvalue) = explode( '=', $argument ); |
59 | | - $argumentkey = preg_replace( '/[^A-Z0-9]/i', '', $argumentkey ); |
60 | | - $argumentvalue = preg_replace( "/\\\\/", '\\\\', $argumentvalue ); |
61 | | - $argumentvalue = preg_replace( "/'/", "\\'", $argumentvalue ); |
| 58 | + $subargumentarr = explode( ',', $argument ); |
| 59 | + foreach ( $subargumentarr as &$singleargument ) { |
| 60 | + $singleargument = preg_replace( "/\\\\/", '\\\\', $singleargument ); |
| 61 | + $singleargument = preg_replace( "/'/", "\\'", $singleargument ); |
62 | 62 | |
63 | | - // Fix escaped separators |
64 | | - $argumentvalue = preg_replace( "/§UNIQ§/", ":", $argumentvalue ); |
65 | | - $argumentvalue = preg_replace( "/§UNIQ2§/", ",", $argumentvalue ); |
66 | | - $this->argumentArray["preprocessorarguments"][$argumentkey] = $argumentvalue; |
| 63 | + // Fix escaped separators |
| 64 | + $singleargument = preg_replace( "/§UNIQ§/", ":", $singleargument ); |
| 65 | + $singleargument = preg_replace( "/§UNIQ2§/", ",", $singleargument ); |
| 66 | + } |
| 67 | + $this->argumentArray["preprocessorarguments"][] = $subargumentarr; |
67 | 68 | } |
68 | 69 | |
69 | 70 | } |
— | — | @@ -76,15 +77,13 @@ |
77 | 78 | |
78 | 79 | // Parse and sanitize arguments - escape single quotes and backslashes |
79 | 80 | $arguments = explode( ',', $argv["scriptarguments"] ); |
80 | | - foreach ( $arguments as &$argument ) { |
81 | | - list($argumentkey, $argumentvalue) = explode( '=', $argument ); |
82 | | - $argumentkey = preg_replace( '/[^A-Z0-9]/i', '', $argumentkey ); |
83 | | - $argumentvalue = preg_replace( "/\\\\/", '\\\\', $argumentvalue ); |
84 | | - $argumentvalue = preg_replace( "/'/", "\\'", $argumentvalue ); |
| 81 | + foreach ( $arguments as $argument ) { |
| 82 | + $argument = preg_replace( "/\\\\/", '\\\\', $argument ); |
| 83 | + $argument = preg_replace( "/'/", "\\'", $argument ); |
85 | 84 | |
86 | 85 | // Fix escaped separators |
87 | | - $argumentvalue = preg_replace( "/§UNIQ§/", ",", $argumentvalue ); |
88 | | - $this->argumentArray["scriptarguments"][$argumentkey] = $argumentvalue; |
| 86 | + $argument = preg_replace( "/§UNIQ§/", ",", $argument ); |
| 87 | + $this->argumentArray["scriptarguments"][] = $argument; |
89 | 88 | } |
90 | 89 | } |
91 | 90 | if ( isset( $argv["datasep"] ) ) { |