[freeside-commits] freeside/rt/share/html/Admin/CustomFields Modify.html, 1.3, 1.4

Ivan,,, ivan at wavetail.420.am
Wed Feb 16 16:52:28 PST 2011


Update of /home/cvs/cvsroot/freeside/rt/share/html/Admin/CustomFields
In directory wavetail.420.am:/tmp/cvs-serv29643/share/html/Admin/CustomFields

Modified Files:
	Modify.html 
Log Message:
commiting rt 3.8.9 to HEAD

Index: Modify.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Admin/CustomFields/Modify.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- Modify.html	5 Oct 2010 17:32:24 -0000	1.3
+++ Modify.html	17 Feb 2011 00:52:26 -0000	1.4
@@ -2,8 +2,8 @@
 %# 
 %# COPYRIGHT:
 %# 
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
 %# 
@@ -214,6 +214,8 @@
         foreach my $attr qw(Name Description SortOrder Category) {
             my $param = join("-", $paramtag, $value->Id, $attr);
             next unless exists $ARGS{$param};
+            $ARGS{$param} =~ s/^\s+//;
+            $ARGS{$param} =~ s/\s+$//;
             next if ($value->$attr()||'') eq ($ARGS{$param}||'');
             my $mutator = "Set$attr";
             my ($id, $msg) = $value->$mutator( $ARGS{$param} );
@@ -224,8 +226,10 @@
     # Add any new values
     if ( defined $ARGS{ $paramtag ."-new-Name" } && length $ARGS{ $paramtag ."-new-Name" } ) {
         my ($id, $msg) = $CustomFieldObj->AddValue(
-            map { $_ => $ARGS{ $paramtag ."-new-$_" } }
-                qw( Name Description SortOrder Category )
+            map { 
+                $ARGS{$paramtag."-new-$_"} =~ s/^\s+//;
+                $ARGS{$paramtag."-new-$_"} =~ s/\s+$//;
+                $_ => $ARGS{ $paramtag ."-new-$_" } } qw/ Name Description SortOrder Category/
         );
         push (@results, $msg);
     }



More information about the freeside-commits mailing list