projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e94bccb
)
prevent broken custom field values, RT#9959
author
mark
<mark>
Tue, 5 Oct 2010 17:32:24 +0000
(17:32 +0000)
committer
mark
<mark>
Tue, 5 Oct 2010 17:32:24 +0000
(17:32 +0000)
rt/share/html/Admin/CustomFields/Modify.html
patch
|
blob
|
history
diff --git
a/rt/share/html/Admin/CustomFields/Modify.html
b/rt/share/html/Admin/CustomFields/Modify.html
index
d2932d2
..
fc2c49d
100644
(file)
--- a/
rt/share/html/Admin/CustomFields/Modify.html
+++ b/
rt/share/html/Admin/CustomFields/Modify.html
@@
-199,6
+199,15
@@
if ( $ARGS{'Update'} && $id ne 'new' ) {
push (@results, $msg);
}
push (@results, $msg);
}
+ # Clean up values
+ foreach my $param (grep /^$paramtag-/, keys(%ARGS)) {
+ for ($ARGS{$param}) {
+ s/\r+\n/\n/g;
+ s/^\s+//;
+ s/\s+$//;
+ }
+ }
+
# Update any existing values
my $values = $CustomFieldObj->ValuesObj;
while ( my $value = $values->Next ) {
# Update any existing values
my $values = $CustomFieldObj->ValuesObj;
while ( my $value = $values->Next ) {
@@
-206,7
+215,6
@@
if ( $ARGS{'Update'} && $id ne 'new' ) {
my $param = join("-", $paramtag, $value->Id, $attr);
next unless exists $ARGS{$param};
next if ($value->$attr()||'') eq ($ARGS{$param}||'');
my $param = join("-", $paramtag, $value->Id, $attr);
next unless exists $ARGS{$param};
next if ($value->$attr()||'') eq ($ARGS{$param}||'');
-
my $mutator = "Set$attr";
my ($id, $msg) = $value->$mutator( $ARGS{$param} );
push (@results, $msg);
my $mutator = "Set$attr";
my ($id, $msg) = $value->$mutator( $ARGS{$param} );
push (@results, $msg);