[Rt-commit] r10026 - rt/branches/3.7-RTIR-RELENG/html/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Thu Dec 20 15:03:47 EST 2007
Author: ruz
Date: Thu Dec 20 15:03:43 2007
New Revision: 10026
Modified:
rt/branches/3.7-RTIR-RELENG/html/Elements/EditCustomFieldFreeform
Log:
* delete new line characters only when CF is not multiply
Modified: rt/branches/3.7-RTIR-RELENG/html/Elements/EditCustomFieldFreeform
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/html/Elements/EditCustomFieldFreeform (original)
+++ rt/branches/3.7-RTIR-RELENG/html/Elements/EditCustomFieldFreeform Thu Dec 20 15:03:43 2007
@@ -52,13 +52,11 @@
<input name="<%$name%>" id="<%$name%>" size="<%$Cols%>" value="<%$Default ? $Default : ''%>" />
% }
<%INIT>
-if ($Multiple and $Values) {
- $Default = '';
- while (my $value = $Values->Next ) {
- $Default .= $value->Content."\n";
- }
-} else {
- $Default =~ s/\s*\n\s*/ /g if $Default;
+if ( $Multiple and $Values ) {
+ $Default = join "\n", map $_->Content, @{ $Values->ItemsArrayRef };
+}
+unless ( $Multiple ) {
+ $Default =~ s/\s*\n+\s*/ /g if $Default;
}
</%INIT>
<%ARGS>
More information about the Rt-commit
mailing list