From ed4226d595a03d370ae3683288f530fd2cfbf11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 18 Oct 2006 10:17:27 +0000 Subject: [PATCH] remove spaces from end/beginning --- libraries/transformations.lib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php index 024dc7c48..d2c5fc024 100644 --- a/libraries/transformations.lib.php +++ b/libraries/transformations.lib.php @@ -15,7 +15,13 @@ function PMA_transformation_getOptions($string) { $nextToken = $nextToken{strlen($nextToken) - 1} == '\'' ? substr($nextToken, 1, -1) : substr($nextToken, 1) . ' ' . strtok('\''); $transform_options[] = $nextToken; } 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; + } } }