remove spaces from end/beginning

This commit is contained in:
Michal Čihař
2006-10-18 10:17:27 +00:00
parent 8006c1a03e
commit ed4226d595

View File

@@ -15,7 +15,13 @@ function PMA_transformation_getOptions($string) {
$nextToken = $nextToken{strlen($nextToken) - 1} == '\'' ? substr($nextToken, 1, -1) : substr($nextToken, 1) . ' ' . strtok('\''); $nextToken = $nextToken{strlen($nextToken) - 1} == '\'' ? substr($nextToken, 1, -1) : substr($nextToken, 1) . ' ' . strtok('\'');
$transform_options[] = $nextToken; $transform_options[] = $nextToken;
} else { } else {
$transform_options[] = $nextToken; $trimmed = trim($nextToken);
if ($trimmed{0} == '\'') {
$trimmed = $nextToken{strlen($nextToken) - 1} == '\'' ? substr($nextToken, 1, -1) : substr($nextToken, 1) . ' ' . strtok('\'');
$transform_options[] = $trimmed;
} else {
$transform_options[] = $nextToken;
}
} }
} }