Write own parser so that quoting is optional (RFE #1579163).
This commit is contained in:
@@ -8,6 +8,8 @@ $HeadURL$
|
||||
2006-10-18 Michal Čihař <michal@cihar.com>
|
||||
* libraries/transformations/text_plain__dateformat.inc.php, lang/*:
|
||||
Support displaying in UTC (RFE #1440386).
|
||||
* libraries/transformations.lib.php: Write own parser so that quoting is
|
||||
optional (RFE #1579163).
|
||||
|
||||
2006-10-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* export.php: export nothing if no tables are selected
|
||||
|
@@ -9,11 +9,13 @@
|
||||
function PMA_transformation_getOptions($string) {
|
||||
$transform_options = array();
|
||||
|
||||
if ($string != '') {
|
||||
if ($string{0} == "'" && $string{strlen($string)-1} == "'") {
|
||||
$transform_options = explode('\',\'', substr($string, 1, strlen($string)-2));
|
||||
/* Parse options */
|
||||
for ($nextToken = strtok($string, ','); $nextToken !== false; $nextToken = strtok(',')) {
|
||||
if ($nextToken{0} == '\'') {
|
||||
$nextToken = $nextToken{strlen($nextToken) - 1} == '\'' ? substr($nextToken, 1, -1) : substr($nextToken, 1) . ' ' . strtok('\'');
|
||||
$transform_options[] = $nextToken;
|
||||
} else {
|
||||
$transform_options = array(0 => $string);
|
||||
$transform_options[] = $nextToken;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user