[Rt-commit] rt branch, 4.2/attribute-change-msg, created. rt-4.2.3-88-gfa7d37c
Alex Vandiver
alexmv at bestpractical.com
Tue Apr 22 18:08:02 EDT 2014
The branch, 4.2/attribute-change-msg has been created
at fa7d37c5879fedce6ffbed7cd259f6f5b69b9045 (commit)
- Log -----------------------------------------------------------------
commit e8ae79bbb85dd3c25c906e529ccf39eca754146e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Apr 22 18:00:57 2014 -0400
Suppress base64'd content in non-english "Content changed from..." message
The previous check only functioned if the user's language was English,
as the call to ->SetSubValues returns a localized string. Rather than
special-casing on the wording, instead override the message based on the
return code.
Fixes I#24665.
diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index c4a8d52..d07fc40 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -251,11 +251,7 @@ if (defined $ARGS{Save}) {
($ok, $msg) = $SubscriptionObj->SetSubValues(%fields);
$fields{'DashboardId'} = $id;
- # not so good to spew base64-encoded data at the user :)
- if ($msg =~ /^Content changed from/) {
- $msg = "Subscription updated.";
- }
-
+ $msg = loc("Subscription updated") if $ok;
push @results, $msg;
}
# create
commit fa7d37c5879fedce6ffbed7cd259f6f5b69b9045
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Apr 22 18:07:47 2014 -0400
Never return 'Changed (base64) to (base64)' as a message
Similar to d24effb1, but even more so -- the end-user cares not for
giant base64 blobs.
diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index 797e22e..e0b9010 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -292,7 +292,9 @@ sub SetContent {
return(0, "Content couldn't be frozen");
}
}
- return $self->_Set( Field => 'Content', Value => $content );
+ my ($ok, $msg) = $self->_Set( Field => 'Content', Value => $content );
+ return ($ok, $self->loc("Attribute updated")) if $ok;
+ return ($ok, $msg);
}
=head2 SubValue KEY
-----------------------------------------------------------------------
More information about the rt-commit
mailing list