[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-365-gea2f91d

? sunnavy sunnavy at bestpractical.com
Tue Apr 27 17:54:32 EDT 2010


The branch, 3.8-trunk has been updated
       via  ea2f91d4b9ed106450ace00ad9b53e03b47f7ebe (commit)
       via  c8cd34f05f07818dc7b0a04186b046e634ac8321 (commit)
      from  54c62fad22c05437bb5ebc424cd85ab2684d586f (commit)

Summary of changes:
 bin/rt.in                                |   12 ++++++------
 lib/RT/Interface/REST.pm                 |    2 +-
 share/html/REST/1.0/Forms/ticket/default |    8 ++++----
 share/html/REST/1.0/dhandler             |    2 +-
 share/html/REST/1.0/search/ticket        |    2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

- Log -----------------------------------------------------------------
commit c8cd34f05f07818dc7b0a04186b046e634ac8321
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 28 05:33:42 2010 +0800

    loose the split /,/ to split/\s*,\s*/

diff --git a/bin/rt.in b/bin/rt.in
index 6ca302e..280af51 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -1514,7 +1514,7 @@ sub vsplit {
         # XXX: This should become a real parser, à la Text::ParseWords.
         $line =~ s/^\s+//;
         $line =~ s/\s+$//;
-        my ( $a, $b ) = split /,/, $line, 2;
+        my ( $a, $b ) = split /\s*,\s*/, $line, 2;
 
         while ($a) {
             no warnings 'uninitialized';
@@ -1522,7 +1522,7 @@ sub vsplit {
                 my $s = $a;
                 while ( $a !~ /'$/ || (   $a !~ /(\\\\)+'$/
                             && $a =~ /(\\)+'$/ )) {
-                    ( $a, $b ) = split /,/, $b, 2;
+                    ( $a, $b ) = split /\s*,\s*/, $b, 2;
                     $s .= ',' . $a;
                 }
                 push @words, $s;
@@ -1531,7 +1531,7 @@ sub vsplit {
                 my $s = $a;
                 while ( $a !~ /}$/ ) {
                     ( $a, $b ) =
-                      split /,/, $b, 2;
+                      split /\s*,\s*/, $b, 2;
                     $s .= ',' . $a;
                 }
                 $s =~ s/^q{/'/;
@@ -1541,7 +1541,7 @@ sub vsplit {
             else {
                 push @words, $a;
             }
-            ( $a, $b ) = split /,/, $b, 2;
+            ( $a, $b ) = split /\s*,\s*/, $b, 2;
         }
 
 
@@ -1556,7 +1556,7 @@ sub expand_list {
     my ($list) = @_;
 
     my @elts;
-    foreach (split /,/, $list) {
+    foreach (split /\s*,\s*/, $list) {
         push @elts, /^(\d+)-(\d+)$/? ($1..$2): $_;
     }
 
diff --git a/lib/RT/Interface/REST.pm b/lib/RT/Interface/REST.pm
index 98e475b..c786832 100755
--- a/lib/RT/Interface/REST.pm
+++ b/lib/RT/Interface/REST.pm
@@ -94,7 +94,7 @@ sub expand_list {
     my ($list) = @_;
 
     my @elts;
-    foreach (split /,/, $list) {
+    foreach (split /\s*,\s*/, $list) {
         push @elts, /^(\d+)-(\d+)$/? ($1..$2): $_;
     }
 
diff --git a/share/html/REST/1.0/Forms/ticket/default b/share/html/REST/1.0/Forms/ticket/default
index b82cb5e..4f20d90 100755
--- a/share/html/REST/1.0/Forms/ticket/default
+++ b/share/html/REST/1.0/Forms/ticket/default
@@ -368,14 +368,14 @@ else {
                 }
                 else {
                     my @new;
-                    my ( $a, $b ) = split /,/, $val, 2;
+                    my ( $a, $b ) = split /\s*,\s*/, $val, 2;
                     while ($a) {
                         no warnings 'uninitialized';
                         if ( $a =~ /^'/ ) {
                             my $s = $a;
                             while ( $a !~ /'$/ || ( $a !~ /(\\\\)+'$/
                                             && $a =~ /(\\)+'$/ ) ) {
-                                ( $a, $b ) = split /,/, $b, 2;
+                                ( $a, $b ) = split /\s*,\s*/, $b, 2;
                                 $s .= ',' . $a;
                             }
                             $s =~ s/^'//;
@@ -386,7 +386,7 @@ else {
                         elsif ( $a =~ /^q{/ ) {
                             my $s = $a;
                             while ( $a !~ /}$/ ) {
-                                ( $a, $b ) = split /,/, $b, 2;
+                                ( $a, $b ) = split /\s*,\s*/, $b, 2;
                                 $s .= ',' . $a;
                             }
                             $s =~ s/^q{//;
@@ -396,7 +396,7 @@ else {
                         else {
                             push @new, $a;
                         }
-                        ( $a, $b ) = split /,/, $b, 2;
+                        ( $a, $b ) = split /\s*,\s*/, $b, 2;
                     }
 
                     my %new;
diff --git a/share/html/REST/1.0/dhandler b/share/html/REST/1.0/dhandler
index 085bbb3..a8dcdba 100755
--- a/share/html/REST/1.0/dhandler
+++ b/share/html/REST/1.0/dhandler
@@ -210,7 +210,7 @@ if ($fields) {
         $output = "Invalid field specification: $fields";
         goto OUTPUT;
     }
-    @fields = map lc, split /,/, $fields;
+    @fields = map lc, split /\s*,\s*/, $fields;
     @fields{@fields} = ();
     unless (exists $fields{id}) {
         unshift @fields, "id";
diff --git a/share/html/REST/1.0/search/ticket b/share/html/REST/1.0/search/ticket
index 46eb5ff..84529ac 100755
--- a/share/html/REST/1.0/search/ticket
+++ b/share/html/REST/1.0/search/ticket
@@ -69,7 +69,7 @@ if ($fields) {
         $output = "Invalid field specification: $fields";
         goto OUTPUT;
     }
-    @fields = map lc, split /,/, $fields;
+    @fields = map lc, split /\s*,\s*/, $fields;
     @fields{@fields} = ();
     unless (exists $fields{id}) {
         unshift @fields, "id";

commit ea2f91d4b9ed106450ace00ad9b53e03b47f7ebe
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 28 05:34:54 2010 +0800

    don't add the extra space for multiple values in Form::compose

diff --git a/bin/rt.in b/bin/rt.in
index 280af51..690ace8 100755
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -1347,7 +1347,7 @@ sub Form::compose {
                         $line .= ",\n$sp$v";
                     }
                     else {
-                        $line = $line ? "$line, $v" : "$key: $v";
+                        $line = $line ? "$line,$v" : "$key: $v";
                     }
                 }
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list